socket_create

(PHP 4 >= 4.1.0)

socket_create -- Create a socket (endpoint for communication)

Description

resource socket_create ( int domain, int type, int protocol)

Varovßnφ

Tato funkce je EXPERIMENT┴LN═. To znamenß, ╛e chovßnφ tΘto funkce a jejφ nßzev, p°esn∞ji °eΦeno COKOLI, co je zde zdokumentovßno, se v budoucφch verzφch PHP m∙╛e BEZ OHL┴⌐EN═ zm∞nit. Berte to v ·vahu a pou╛φvejte tuto funkci na vlastnφ nebezpeΦφ.

Creates a communication endpoint (a socket), and returns a descriptor to the socket.

The domain parameter sets the domain. Currently, AF_INET and AF_UNIX are understood.

The type parameter selects the socket type. This is one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, SOCK_RDM, or SOCK_PACKET.

protocol sets the protocol.

Returns a valid socket descriptor on success, or a negative error code on failure. This code may be passed to socket_strerror() to get a textual explanation of the error.

For more information on the usage of socket_create(), as well as on the meanings of the various parameters, see the Unix man page socket (2).

See also socket_accept(), socket_bind(), socket_connect(), socket_listen(), and socket_strerror().