Next: , Previous: Sockets.DatagramSocket class-initialization, Up: Sockets.DatagramSocket


6.6.3 Sockets.DatagramSocket class: instance creation

local: ipAddressOrString port: remotePort
Create a new socket and bind it to the given host (passed as a String to be resolved or as an IPAddress), on the given port.


new
Answer a new datagram socket (by default an UDP socket), without a specified local address and port.


port: localPort
Create a new socket and bind it to the local host on the given port.


remote: ipAddressOrString port: remotePort local: ipAddress port: localPort
Create a new socket and bind it to the given host (passed as a String to be resolved or as a SocketAddress), and to the given remotePort. The default destination for the datagrams will be ipAddressOrString (if not nil), on the remotePort port.