This is a socket client that sends and receives DOM nodes.
|
| GDomClient () |
|
virtual | ~GDomClient () |
|
const GDomNode * | receive () |
| Receive the next available DOM node, or NULL if none are ready. More...
|
|
void | send (GDomNode *pNode) |
| Send the specified DOM node. More...
|
|
| GPackageClient () |
|
virtual | ~GPackageClient () |
|
void | connect (const char *addr, unsigned short port, int timeoutSecs=20) |
| Connect to a server. Throws an exception if it fails to connect within the specified timout period. More...
|
|
void | disconnect () |
| Disconnect from the server. More...
|
|
virtual void | pump () |
| Receives any pending messages into an internal buffer (to unblock the server, in case its send buffer is full.) More...
|
|
char * | receive (size_t *pLen) |
| Receive the next available package. (This returns a pointer to an internal buffer, the contents of which only remain valid until the next time you call receive.) More...
|
|
void | send (const char *buf, size_t len) |
| Send a package, which guarantees to arrive in the same order and size as it was sent. More...
|
|
void | setMaxBufferSizes (size_t a, size_t b) |
| Sets some internal values that guide how it reallocates the internal buffer. 'a' is the maximum buffer size to keep around. 'b' is the maximum size for the buffer ever. If a package bigger than 'b' is sent, an exception will be thrown. If a package bigger than 'a' is sent, then the buffer will be grown to that size, but it will be made small again the next time a package is received. More...
|
|