UDPSocket::UDPSocket(const string &localAddress, unsigned short localPort) throw(SocketException) : CommunicatingSocket(SOCK_DGRAM, IPPROTO_UDP) { setLocalAddressAndPort(localAddress, localPort); setBroadcast(); }
TCPServerSocket::TCPServerSocket(const std::string &localAddress, unsigned short localPort, int queueLen): Socket(SOCK_STREAM, IPPROTO_TCP) { setLocalAddressAndPort(localAddress, localPort); setListen(queueLen); }
ServerSocket::ServerSocket() : GenericSocket(SOCK_STREAM, IPPROTO_TCP){ setLocalAddressAndPort("127.0.0.1", DEFAULT_LISTEN_PORT); }