remove DatagramSocket Unbound constructor

This commit is contained in:
Guenter Obiltschnig
2016-02-29 10:17:30 +01:00
parent 3d1a094725
commit 1a8479f7ea
6 changed files with 0 additions and 38 deletions

View File

@@ -33,17 +33,9 @@ class Net_API DatagramSocket: public Socket
/// UDP stream socket. /// UDP stream socket.
{ {
public: public:
enum Unbound
{
SOCKET_CREATE_UNBOUND
};
DatagramSocket(); DatagramSocket();
/// Creates an unconnected IPv4 datagram socket. /// Creates an unconnected IPv4 datagram socket.
explicit DatagramSocket(Unbound unbound);
/// Creates an unconnected, unbound datagram socket.
explicit DatagramSocket(IPAddress::Family family); explicit DatagramSocket(IPAddress::Family family);
/// Creates an unconnected datagram socket. /// Creates an unconnected datagram socket.
/// ///

View File

@@ -43,9 +43,6 @@ public:
MulticastSocket(); MulticastSocket();
/// Creates the multicast socket. /// Creates the multicast socket.
explicit MulticastSocket(Unbound unbound);
/// Creates an unconnected, unbound multicast datagram socket.
explicit MulticastSocket(IPAddress::Family family); explicit MulticastSocket(IPAddress::Family family);
/// Creates an unconnected datagram socket. /// Creates an unconnected datagram socket.
/// ///

View File

@@ -31,11 +31,6 @@ DatagramSocket::DatagramSocket(): Socket(new DatagramSocketImpl)
} }
DatagramSocket::DatagramSocket(Unbound): Socket(new DatagramSocketImpl(POCO_INVALID_SOCKET))
{
}
DatagramSocket::DatagramSocket(IPAddress::Family family): Socket(new DatagramSocketImpl(family)) DatagramSocket::DatagramSocket(IPAddress::Family family): Socket(new DatagramSocketImpl(family))
{ {
} }

View File

@@ -53,11 +53,6 @@ MulticastSocket::MulticastSocket()
} }
MulticastSocket::MulticastSocket(Unbound unbound): DatagramSocket(unbound)
{
}
MulticastSocket::MulticastSocket(IPAddress::Family family): DatagramSocket(family) MulticastSocket::MulticastSocket(IPAddress::Family family): DatagramSocket(family)
{ {
} }

View File

@@ -78,21 +78,6 @@ void DatagramSocketTest::testSendToReceiveFrom()
} }
void DatagramSocketTest::testUnbound()
{
UDPEchoServer echoServer;
DatagramSocket ss(DatagramSocket::SOCKET_CREATE_UNBOUND);
char buffer[256];
ss.connect(SocketAddress("localhost", echoServer.port()));
int n = ss.sendBytes("hello", 5);
assert (n == 5);
n = ss.receiveBytes(buffer, sizeof(buffer));
assert (n == 5);
assert (std::string(buffer, n) == "hello");
ss.close();
}
void DatagramSocketTest::testBroadcast() void DatagramSocketTest::testBroadcast()
{ {
UDPEchoServer echoServer; UDPEchoServer echoServer;
@@ -151,7 +136,6 @@ CppUnit::Test* DatagramSocketTest::suite()
CppUnit_addTest(pSuite, DatagramSocketTest, testEcho); CppUnit_addTest(pSuite, DatagramSocketTest, testEcho);
CppUnit_addTest(pSuite, DatagramSocketTest, testSendToReceiveFrom); CppUnit_addTest(pSuite, DatagramSocketTest, testSendToReceiveFrom);
CppUnit_addTest(pSuite, DatagramSocketTest, testUnbound);
#if (POCO_OS != POCO_OS_FREE_BSD) // works only with local net bcast and very randomly #if (POCO_OS != POCO_OS_FREE_BSD) // works only with local net bcast and very randomly
CppUnit_addTest(pSuite, DatagramSocketTest, testBroadcast); CppUnit_addTest(pSuite, DatagramSocketTest, testBroadcast);
#endif #endif

View File

@@ -28,7 +28,6 @@ public:
void testEcho(); void testEcho();
void testSendToReceiveFrom(); void testSendToReceiveFrom();
void testUnbound();
void testBroadcast(); void testBroadcast();
void setUp(); void setUp();