Pike v8.0 release 1738

Method Stdio.UDP()->connect()


Method connect

bool connect(string address, int|string port)

Description

Establish an UDP connection.

This function connects an UDP socket previously created with Stdio.UDP() to a remote socket. The address is the IP name or number for the remote machine.

Returns

Returns 1 on success, 0 (zero) otherwise.

Note

If the socket is in nonblocking mode, you have to wait for a write or close callback before you know if the connection failed or not.

See also

bind(), query_address()