std.socket.Socket.Connect - nitrologic/monkey2 GitHub Wiki

std::std.socket.std.socket.Socket.Connect

Function Connect:std:std.socket.Socket( hostname:monkey:monkey.types.String,service:monkey:monkey.types.String,type:std:std.socket.SocketType=SocketType.Stream,flags:std:std.socket.SocketFlags=Null )

Creates a connected socket.

Attempts to connect to the host at hostname and service at service and returns a new connected socket if successful.

The socket type should be SocketType.Stream (the default) is connecting to stream server, or SocketType.DataGram if connecting to a datagram server.

Returns null upon failure.