ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/SubNet.h
Revision: 1.1
Committed: Mon Mar 5 14:02:27 2001 UTC (23 years, 7 months ago) by ab11
Content type: text/plain
Branch: MAIN
Log Message:
Solves many of the problems associated with memory allocation and dealocation with the socket++ library. Also should prevent memory leaks as the proper destructor methods are being called now.

File Contents

# Content
1 #include <iostream>
2 #include <string>
3 #include "socket++-1.10/sockinet.h"
4
5 using std::string;
6
7 class SubNet {
8
9 public:
10 // constructor
11 SubNet(string host, int port);
12 SubNet();
13 string sendTCP(string text);
14 void sendUPDPacket( string host, int port, string message );
15 string getIPfromHost(string hostname);
16 string getHostName();
17 string getHostIP();
18 int isConnected();
19
20 private:
21 int connect;
22 iosockinet * socket; // TCP socket
23 osockinet * udp; // UDP socket
24
25
26
27
28 }; // class