Returns a new socket connected to the specified remote inet address object and port and local inet address object and port.
Syntax
Socket( inetaddress , port )
Socket( inetaddress , port )
Socket( inetaddress , port , boolean )
Socket( inetaddress , port , localaddress , localport )
Socket( host , port )
Socket( host , port , boolean )
Socket( host , port , localaddress , localport )
Parameters
inetaddress
|
the inet address object to use.
|
port
|
the port number.
|
boolean
|
true to create a stream socket object.
false to create a datagram socket object.
|
localaddress
|
the local inet address object the socket is bound to.
|
localport
|
the local port number the socket is bound to.
|
Returns
socket
|
the new socket object.
|
Example
s = Socket( host, port )
|