Add listenUDP overload taking a NetworkAddress.
This commit is contained in:
parent
1ef8d5206f
commit
7e1d6a7323
|
@ -208,6 +208,11 @@ TCPConnection connectTCP(NetworkAddress addr, NetworkAddress bind_address = anyA
|
|||
/**
|
||||
Creates a bound UDP socket suitable for sending and receiving packets.
|
||||
*/
|
||||
UDPConnection listenUDP(ref NetworkAddress addr)
|
||||
{
|
||||
return UDPConnection(addr);
|
||||
}
|
||||
/// ditto
|
||||
UDPConnection listenUDP(ushort port, string bind_address = "0.0.0.0")
|
||||
{
|
||||
auto addr = resolveHost(bind_address, AddressFamily.UNSPEC, false);
|
||||
|
|
Loading…
Reference in a new issue