PHP.nl

socket_connect

socket_connect

Initiates a connection on a socket

bool **socket_connect** Socket $socket string $address  $port

Initiate a connection to using the instance , which must be instance created with . address``Socket``socket``Socket``socket_create

socket A instance created with . Socket``socket_create

address The parameter is either an IPv4 address in dotted-quad notation (e.g. ) if is , a valid IPv6 address (e.g. ) if IPv6 support is enabled and is or the pathname of a Unix domain socket, if the socket family is . address``127.0.0.1``socket``AF_INET``::1``socket``AF_INET6``AF_UNIX

port The parameter is only used and is mandatory when connecting to an or an socket, and designates the port on the remote host to which a connection should be made. port``AF_INET``AF_INET6

return.success The error code can be retrieved with . This code may be passed to to get a textual explanation of the error. socket_last_error``socket_strerror

Opmerking: > If the socket is non-blocking then this function returns false with an error . Operation now in progress

socket_bind``socket_listen``socket_create``socket_last_error``socket_strerror