#include <PracticalSocket.h>
Public Member Functions | |
TCPSocket () throw (SocketException) | |
TCPSocket (const string &foreignAddress, unsigned short foreignPort) throw (SocketException) | |
Public Member Functions inherited from br::pucrio::telemidia::ginga::core::system::compat::CommunicatingSocket | |
void | connect (const string &foreignAddress, unsigned short foreignPort) throw (SocketException) |
void | send (const void *buffer, int bufferLen) throw (SocketException) |
int | recv (void *buffer, int bufferLen) throw (SocketException) |
string | getForeignAddress () throw (SocketException) |
unsigned short | getForeignPort () throw (SocketException) |
Public Member Functions inherited from br::pucrio::telemidia::ginga::core::system::compat::Socket | |
~Socket () | |
string | getLocalAddress () throw (SocketException) |
unsigned short | getLocalPort () throw (SocketException) |
void | setLocalPort (unsigned short localPort) throw (SocketException) |
void | setLocalAddressAndPort (const string &localAddress, unsigned short localPort=0) throw (SocketException) |
Friends | |
class | TCPServerSocket |
Additional Inherited Members | |
Static Public Member Functions inherited from br::pucrio::telemidia::ginga::core::system::compat::Socket | |
static void | cleanUp () throw (SocketException) |
static unsigned short | resolveService (const string &service, const string &protocol="tcp") |
Protected Member Functions inherited from br::pucrio::telemidia::ginga::core::system::compat::CommunicatingSocket | |
CommunicatingSocket (int type, int protocol) throw (SocketException) | |
CommunicatingSocket (int newConnSD) | |
Protected Member Functions inherited from br::pucrio::telemidia::ginga::core::system::compat::Socket | |
Socket (int type, int protocol) throw (SocketException) | |
Socket (int sockDesc) | |
Protected Attributes inherited from br::pucrio::telemidia::ginga::core::system::compat::Socket | |
int | sockDesc |
TCP socket for communication with other TCP sockets
br::pucrio::telemidia::ginga::core::system::compat::TCPSocket::TCPSocket | ( | ) | ||
throw | ( | SocketException | ||
) |
Construct a TCP socket with no connection
SocketException | thrown if unable to create TCP socket |
br::pucrio::telemidia::ginga::core::system::compat::TCPSocket::TCPSocket | ( | const string & | foreignAddress, |
unsigned short | foreignPort | ||
) | |||
throw | ( | SocketException | |
) |
Construct a TCP socket with a connection to the given foreign address and port
foreignAddress | foreign address (IP address or name) |
foreignPort | foreign port |
SocketException | thrown if unable to create TCP socket |