In file socket.hxx:

class OConnectorSocket : public OStreamSocket

A socket to initiate a conenction

Inheritance:


Public Methods

TResult connect (const OSocketAddr& TargetHost, int msTimeout= -1)
Connects the socket to a (remote) host
OConnectorSocket (TAddrFamily Family= af_inet, TProtocol Protocol= protocol_ip, TSocketType Type= sock_stream)
Creates a socket that can accept connections
OConnectorSocket (const OConnectorSocket& Socket)
Copy constructor
virtual ~OConnectorSocket ()
Destructor

Inherited from OStreamSocket:

Public Methods

virtual Boolean isEof()
OStreamSocket& operator=(oslSocket Socket)
virtual long read(void* pBuffer, long n)
int recv(void* pBuffer, int BytesToRead, TSocketMsgFlag Flag= msg_normal)
int send(const void* pBuffer, int BytesToSend, TSocketMsgFlag Flag= msg_normal)
Boolean shutdown(TSocketDirection Direction= direction_readwrite)
virtual long write(const void* pBuffer, long n)

Inherited from OSocket:

Public Methods

Boolean bind(const OSocketAddr& LocalInterface)
int clearError()
void close()
Boolean enableNonBlockingMode(Boolean On= True)
TSocketError getError()
void getError(char* pBuffer, int nSize)
void getLocalAddr(OSocketAddr& Addr)
const char* getLocalHost()
int getLocalPort()
int getOption(TSocketOption Option, void* pBuffer, int BufferLen, TSocketOptionLevel Level= sol_socket)
void getPeerAddr(OSocketAddr& Addr)
const char* getPeerHost()
int getPeerPort()
TSocketType getType()
Boolean isExceptionPending(int wp_sec, int wp_usec = 0)
Boolean isRecvReady(int wp_sec, int wp_usec = 0)
Boolean isSendReady(int wp_sec, int wp_usec = 0)
Boolean isValid()
operator oslSocket()
operator oslSocket()
int setBroadcast(int opt = -1)
int setDebug(int opt = -1)
int setDontRoute(int opt = -1)
int setKeepAlive(int opt = -1)
int setLinger(int time = -1)
int setOobinline(int opt = -1)
Boolean setOption(TSocketOption Option, void* pBuffer, int BufferLen, TSocketOptionLevel Level= sol_socket)
int setRecvBufSize(int size =-1)
int setRecvTimeout(int time= -1)
int setReuseAddr(int opt = -1)
int setSendBufSize(int size =-1)
int setSendTimeout(int time= -1)
int setTcpNoDelay(int sz =-1)

Inherited from ISocketTypes:


Inherited from IStream:


Documentation

A socket to initiate a conenction
OConnectorSocket(TAddrFamily Family= af_inet, TProtocol Protocol= protocol_ip, TSocketType Type= sock_stream)
Creates a socket that can accept connections.
Parameters:
Type - For some protocols it might be desirable to use a different type than sock_stream (like sock_seqpacket). Therefore we do not hide this parameter here.

OConnectorSocket(const OConnectorSocket& Socket)
Copy constructor. Doesn't duplicate oslSocket.

virtual ~OConnectorSocket()
Destructor. Relies on ~OStreamSocket to close down connection gracefully.

TResult connect(const OSocketAddr& TargetHost, int msTimeout= -1)
Connects the socket to a (remote) host
Returns:
result_ok if connected successfully, result_timeout on timeout, result_interrupted if unblocked forcefully (by close()), result_error if connect failed.
Parameters:
TargetHost - The address of the target.
msTimeout - The timeout in milliseconds. Use -1 to block.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de