uicore::TCPConnection Class Referenceabstract

TCP/IP socket connection. More...

#include <tcp_connection.h>

+ Inheritance diagram for uicore::TCPConnection:

Public Member Functions

virtual void close ()=0
 Close connection. More...
 
virtual SocketName local_name ()=0
 Returns the socket name of the local end point. More...
 
virtual int read (void *data, int size)=0
 Read data from TCP socket. More...
 
virtual SocketName remote_name ()=0
 Returns the socket name of the peer end point. More...
 
virtual int write (const void *data, int size)=0
 Write data to TCP socket. More...
 

Static Public Member Functions

static std::shared_ptr< TCPConnectionconnect (const SocketName &endpoint)
 Blocking connect to end point. More...
 

Additional Inherited Members

- Protected Member Functions inherited from uicore::NetworkEvent
virtual SocketHandle * socket_handle ()=0
 

Detailed Description

TCP/IP socket connection.

Member Function Documentation

virtual void uicore::TCPConnection::close ( )
pure virtual

Close connection.

static std::shared_ptr<TCPConnection> uicore::TCPConnection::connect ( const SocketName endpoint)
static

Blocking connect to end point.

virtual SocketName uicore::TCPConnection::local_name ( )
pure virtual

Returns the socket name of the local end point.

virtual int uicore::TCPConnection::read ( void *  data,
int  size 
)
pure virtual

Read data from TCP socket.

Returns
Bytes read, 0 if remote closed connection, or -1 if buffer is empty
virtual SocketName uicore::TCPConnection::remote_name ( )
pure virtual

Returns the socket name of the peer end point.

virtual int uicore::TCPConnection::write ( const void *  data,
int  size 
)
pure virtual

Write data to TCP socket.

Returns
Bytes written, or -1 if buffer is full

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