|
Public Types |
| enum | SockState {
skDISCONNECTED = 0,
skUNDEF1,
skLISTENING,
skUNDEF3,
skUNDEF4,
skUNDEF5,
skUNDEF6,
skCONNECTED,
skERROR
} |
Public Member Functions |
| | EzSockets () |
| | ~EzSockets () |
| bool | create () |
| bool | create (int Protocol) |
| bool | create (int Protocol, int Type) |
| bool | bind (unsigned short port) |
| bool | listen () |
| bool | accept (EzSockets &socket) |
| bool | connect (const string &host, unsigned short port) |
| void | close () |
| bool | check () |
| long | uAddr () |
| bool | CanRead () |
| bool | IsError () |
| bool | CanWrite () |
| void | update () |
| void | SendData (const string &outData) |
| void | SendData (const char *data, unsigned int bytes) |
| int | ReadData (char *data, unsigned int bytes) |
| int | PeekData (char *data, unsigned int bytes) |
| void | SendPack (const char *data, unsigned int bytes) |
| int | ReadPack (char *data, unsigned int max) |
| int | PeekPack (char *data, unsigned int max) |
| void | SendStr (const string &data, char delim= '\0') |
| int | ReadStr (string &data, char delim= '\0') |
| int | PeekStr (string &data, char delim= '\0') |
| char | operator[] (int i) |
| int | pUpdateWrite () |
| int | pUpdateRead () |
| int | pReadData (char *data) |
| int | pWriteData (const char *data, int dataSize) |
Public Attributes |
| bool | blocking |
| sockaddr_in | fromAddr |
| unsigned long | fromAddr_len |
| string | inBuffer |
| string | outBuffer |
| SockState | state |
| int | lastCode |
| CString | address |
Private Attributes |
| int | MAXCON |
| int | sock |
| sockaddr_in | addr |
| fd_set * | scks |
| timeval * | times |
Friends |
| istream & | operator>> (istream &is, EzSockets &obj) |
| ostream & | operator<< (ostream &os, const EzSockets &obj) |