Changeset 14 in cheroxy for trunk/include
- Timestamp:
- 10/24/12 11:12:11 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/CRXSocket.h
r5 r14 18 18 using namespace std; 19 19 20 typedef struct sockaddr stSockAddr; 21 typedef struct sockaddr_in stSockAddrIn; 22 typedef unsigned short ushort; 23 typedef unsigned int uint; 20 #define TCPSOCKET_NO_TIMEOUT -1 24 21 25 22 #define ERROR_TCPSOCKET -1000 … … 36 33 #define ERROR_TCPSOCKET_FAILED_TO_RECEIVE ERROR_TCPSOCKET - 10 37 34 #define ERROR_TCPSOCKET_NOT_READY ERROR_TCPSOCKET - 11 35 #define ERROR_TCPSOCKET_FAILED_TO_SETSOCKOPT ERROR_TCPSOCKET - 12 38 36 39 37 class CRXSocket 40 38 { 41 39 private: 42 static bool mInitialized;43 st SockAddrIn mAddress;44 int mSocket;40 static bool mInitialized; 41 struct sockaddr_in mAddress; 42 int mSocket; 45 43 46 44 private: … … 90 88 * for server 91 89 */ 92 int CreateServer ( ushortaPort,93 intaBacklog = 5,94 st SockAddrIn* aAddress = NULL);90 int CreateServer (const unsigned short aPort, 91 const int aBacklog = 5, 92 struct sockaddr_in * aAddress = NULL); 95 93 96 int Accept (st SockAddrIn * aRemoteAddress = NULL,97 int * aAddressLength = NULL);94 int Accept (struct sockaddr_in * aRemoteAddress = NULL, 95 int * aAddressLength = NULL); 98 96 99 97 /** 100 98 * for client 101 99 */ 102 int Connect (std::string aUrl, 103 ushort aPort); 100 int Connect (const std::string aUrl, 101 const unsigned short aPort, 102 const int aTimeout = TCPSOCKET_NO_TIMEOUT); 104 103 105 104 /**
Note:
See TracChangeset
for help on using the changeset viewer.