c Sockets wrapper class.
More...
#include <Socket.h>
void hazelcast::client::Socket::close |
( |
| ) |
|
closes the socket.
Automatically called in destructor. Second call to this function is no op.
int hazelcast::client::Socket::connect |
( |
int |
timeoutInMillis | ) |
|
connects to given address in constructor.
- Parameters
-
timeoutInMillis | if not connected within timeout, it will return errorCode |
- Returns
- zero if error. -1 otherwise.
const client::Address & hazelcast::client::Socket::getRemoteEndpoint |
( |
| ) |
const |
int hazelcast::client::Socket::receive |
( |
void * |
buffer, |
|
|
int |
len, |
|
|
int |
flag = 0 |
|
) |
| const |
- Parameters
-
buffer | |
len | length of the buffer to be received. |
flag | bsd sockets options flag. |
- Returns
- number of bytes received.
- Exceptions
-
int hazelcast::client::Socket::send |
( |
const void * |
buffer, |
|
|
int |
len |
|
) |
| const |
|
virtual |
- Parameters
-
buffer | |
len | length of the buffer |
- Returns
- number of bytes send
- Exceptions
-
void hazelcast::client::Socket::setRemoteEndpoint |
( |
const client::Address & |
address | ) |
|
- Parameters
-
address | remote endpoint address. |
The documentation for this class was generated from the following files:
- hazelcast/include/hazelcast/client/Socket.h
- hazelcast/src/hazelcast/client/Socket.cpp