20 #ifndef __PRACTICALSOCKET_INCLUDED__
21 #define __PRACTICALSOCKET_INCLUDED__
41 SocketException(
const string &message,
bool inclSysMsg =
false)
throw();
52 const char *what()
const throw();
98 void setLocalAddressAndPort(
const string &localAddress,
122 static unsigned short resolveService(
const string &service,
123 const string &protocol =
"tcp");
128 void operator=(
const Socket &sock);
148 void connect(
const string &foreignAddress,
unsigned short foreignPort)
207 TCPSocket(
const string &foreignAddress,
unsigned short foreignPort)
280 UDPSocket(
const string &localAddress,
unsigned short localPort)
300 void sendTo(
const void *buffer,
int bufferLen,
const string &foreignAddress,
313 int recvFrom(
void *buffer,
int bufferLen,
string &sourceAddress,
321 void setMulticastTTL(
unsigned char multicastTTL)
throw(
SocketException);