Hazelcast C++ Client
 All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
hazelcast::client::Socket Class Referenceabstract

Sockets wrapper interface class. More...

#include <Socket.h>

+ Inheritance diagram for hazelcast::client::Socket:

Public Member Functions

virtual ~Socket ()
 Destructor.
 
virtual int connect (int timeoutInMillis)=0
 connects to given address in constructor. More...
 
virtual int send (const void *buffer, int len) const =0
 
virtual int receive (void *buffer, int len, int flag=0) const =0
 
virtual int getSocketId () const =0
 return socketId
 
virtual void setRemoteEndpoint (const client::Address &address)=0
 
virtual const client::AddressgetRemoteEndpoint () const =0
 
virtual void close ()=0
 closes the socket. More...
 
virtual client::Address getAddress () const =0
 
virtual void setBlocking (bool blocking)=0
 

Detailed Description

Sockets wrapper interface class.

Member Function Documentation

virtual void hazelcast::client::Socket::close ( )
pure virtual

closes the socket.

Automatically called in destructor. Second call to this function is no op.

Implemented in hazelcast::client::internal::socket::TcpSocket.

virtual int hazelcast::client::Socket::connect ( int  timeoutInMillis)
pure virtual

connects to given address in constructor.

Parameters
timeoutInMillisif not connected within timeout, it will return errorCode
Returns
0 on success.
Exceptions
IOExceptionon failure.

Implemented in hazelcast::client::internal::socket::TcpSocket.

virtual const client::Address& hazelcast::client::Socket::getRemoteEndpoint ( ) const
pure virtual
Returns
remoteEndpoint

Implemented in hazelcast::client::internal::socket::TcpSocket.

virtual int hazelcast::client::Socket::receive ( void *  buffer,
int  len,
int  flag = 0 
) const
pure virtual
Parameters
buffer
lenlength of the buffer to be received.
flagbsd sockets options flag. Only MSG_WAITALL is supported when SSL is enabled.
Returns
number of bytes received.
Exceptions
IOExceptionin failure.

Implemented in hazelcast::client::internal::socket::TcpSocket.

virtual int hazelcast::client::Socket::send ( const void *  buffer,
int  len 
) const
pure virtual
Parameters
buffer
lenlength of the buffer
Returns
number of bytes send
Exceptions
IOExceptionin failure.

Implemented in hazelcast::client::internal::socket::TcpSocket.

virtual void hazelcast::client::Socket::setRemoteEndpoint ( const client::Address address)
pure virtual
Parameters
addressremote endpoint address.

Implemented in hazelcast::client::internal::socket::TcpSocket.


The documentation for this class was generated from the following files: