VoiceMan
Public Member Functions | List of all members
InetSocket Class Reference

The TCP/IP socket. More...

Inheritance diagram for InetSocket:
Socket

Public Member Functions

 InetSocket ()
 The default constructor.
 
void open (int port)
 Creates new TCP/IP socket. More...
 
virtual ~InetSocket ()
 The destructor.
 
- Public Member Functions inherited from Socket
void close ()
 Closes connection. More...
 
int getHandler () const
 Returns system connection handler. More...
 
bool opened () const
 Returns non-zero if connection was opened. More...
 
ssize_t read (void *buf, size_t s) const
 Reads data from the socket. More...
 
ssize_t read (std::string &s) const
 Reads data and saves it in string object. More...
 
 Socket ()
 The default constructor.
 
 Socket (int fd)
 The constructor with file descriptor specification. More...
 
ssize_t write (const void *buf, size_t s) const
 Writes data to socket. More...
 
virtual ~Socket ()
 The destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Socket
bool m_opened
 
int m_sock
 

Detailed Description

This class is the interface to create server UTCP/IP socket. No client behavior is implemented. Only port number of socket is required to prepare object of this class.

Member Function Documentation

void InetSocket::open ( int  port)

This method creates new TCP/IP socket and prepares it for functioning. YOu should provide file name for new socket. This method does not return any exit code. All errors are reported with SystemException.

Parameters
[in]portThe port for new socket
See also
SystemException