Skip to content

Std socket socket connect

std:std.socket.Socket.Connect

Function Connect:Socket( hostname:String,service:String,type:SocketType=SocketType.Stream,flags: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.