mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
fixed #892: DatagramSocket is ipv4 by default (added new constructors for creating an unconnected and unbound DatagramSocket or MulticastSocket)
This commit is contained in:
@@ -33,9 +33,17 @@ class Net_API DatagramSocket: public Socket
|
||||
/// UDP stream socket.
|
||||
{
|
||||
public:
|
||||
enum Unbound
|
||||
{
|
||||
SOCKET_CREATE_UNBOUND
|
||||
};
|
||||
|
||||
DatagramSocket();
|
||||
/// Creates an unconnected IPv4 datagram socket.
|
||||
|
||||
explicit DatagramSocket(Unbound unbound);
|
||||
/// Creates an unconnected, unbound datagram socket.
|
||||
|
||||
explicit DatagramSocket(IPAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
|
||||
@@ -33,11 +33,7 @@ class Net_API DatagramSocketImpl: public SocketImpl
|
||||
{
|
||||
public:
|
||||
DatagramSocketImpl();
|
||||
/// Creates a DatagramSocketImpl.
|
||||
///
|
||||
/// If the system supports IPv6, the socket will
|
||||
/// be an IPv6 socket. Otherwise, it will be
|
||||
/// an IPv4 socket.
|
||||
/// Creates an unconnected, unbound datagram socket.
|
||||
|
||||
explicit DatagramSocketImpl(IPAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
|
||||
@@ -41,7 +41,10 @@ class Net_API MulticastSocket: public DatagramSocket
|
||||
{
|
||||
public:
|
||||
MulticastSocket();
|
||||
/// Creates the MulticastSocket.
|
||||
/// Creates the multicast socket.
|
||||
|
||||
explicit MulticastSocket(Unbound unbound);
|
||||
/// Creates an unconnected, unbound multicast datagram socket.
|
||||
|
||||
explicit MulticastSocket(IPAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
|
||||
Reference in New Issue
Block a user