Next: , Previous: , Up: Sockets.StreamSocket   [Index]


6.22.3 Sockets.StreamSocket class: instance creation

remote: ipAddressOrString port: remotePort

Create a new socket and connect to the given host (passed as a String to be resolved or as a SocketAddress), and to the given port.

remote: ipAddressOrString port: remotePort local: ipAddress port: localPort

Create a new socket and connect to the given host (passed as a String to be resolved or as a SocketAddress), and to the given remotePort. Then bind it to the local address passed in ipAddress, on the localPort port; if the former is nil, any local address will do, and if the latter is 0, any local port will do.