#include <TcpSocket.h>
Inheritance diagram for TcpSocket:
Definition at line 57 of file TcpSocket.h.
Public Member Functions | |
TcpSocket (const char *host, unsigned short port) throw ( Exception ) | |
Constructor. | |
TcpSocket (const TcpSocket &ss) throw ( Exception ) | |
Copy constructor. | |
virtual | ~TcpSocket (void) throw ( Exception ) |
Destructor. | |
virtual TcpSocket & | operator= (const TcpSocket &ss) throw ( Exception ) |
Assignment operator. | |
const char * | getHost (void) const throw () |
Get the host this socket connects to. | |
unsigned int | getPort (void) const throw () |
Get the port this socket connects to. | |
virtual bool | open (void) throw ( Exception ) |
Open the TcpSocket. | |
virtual bool | isOpen (void) const throw () |
Check if the TcpSocket is open. | |
virtual bool | canRead (unsigned int sec, unsigned int usec) throw ( Exception ) |
Check if the TcpScoket can be read from. | |
virtual unsigned int | read (void *buf, unsigned int len) throw ( Exception ) |
Read from the TcpSocket. | |
virtual bool | canWrite (unsigned int sec, unsigned int usec) throw ( Exception ) |
Check if the TcpSocket is ready to accept data. | |
virtual unsigned int | write (const void *buf, unsigned int len) throw ( Exception ) |
Write data to the TcpSocket. | |
virtual void | flush (void) throw ( Exception ) |
Flush all data that was written to the TcpSocket to the underlying connection. | |
virtual void | close (void) throw ( Exception ) |
Close the TcpSocket. | |
Protected Member Functions | |
TcpSocket (void) throw ( Exception ) | |
Default constructor. |
|
Default constructor. Always throws an Exception.
Definition at line 104 of file TcpSocket.h. |
|
Constructor.
Definition at line 120 of file TcpSocket.h. |
|
Copy constructor.
Definition at line 136 of file TcpSocket.cpp. |
|
Destructor.
Definition at line 140 of file TcpSocket.h. |
|
Check if the TcpScoket can be read from. Blocks until the specified time for data to be available.
Implements Source. Definition at line 241 of file TcpSocket.cpp. |
|
Check if the TcpSocket is ready to accept data. Blocks until the specified time for data to be available.
Implements Sink. Definition at line 294 of file TcpSocket.cpp. |
|
Close the TcpSocket.
Implements Sink. Definition at line 355 of file TcpSocket.cpp. References flush(), and isOpen(). Referenced by open(). |
|
Flush all data that was written to the TcpSocket to the underlying connection.
Implements Sink. Definition at line 257 of file TcpSocket.h. Referenced by close(). |
|
Get the host this socket connects to.
Definition at line 161 of file TcpSocket.h. |
|
Get the port this socket connects to.
Definition at line 172 of file TcpSocket.h. |
|
Check if the TcpSocket is open.
Implements Sink. Definition at line 192 of file TcpSocket.h. |
|
Open the TcpSocket.
Implements Sink. Definition at line 187 of file TcpSocket.cpp. |
|
Assignment operator.
Definition at line 156 of file TcpSocket.cpp. References Source::operator=(), and Sink::operator=(). |
|
Read from the TcpSocket.
Implements Source. Definition at line 271 of file TcpSocket.cpp. |
|
Write data to the TcpSocket.
Implements Sink. Definition at line 324 of file TcpSocket.cpp. |