Gen. partnerAlgotech

PHP function stream_socket_server()

Create an Internet or Unix domain server socket

|
September 11, 2019

Availability in PHP 5.0

Create an Internet or Unix domain server socket

Parameters

Parameter Data type Default value Note
$local_socket string not The type of socket created is determined by the transport specified using standard URL formatting: transport://target.
$errno int null, If the optional errno and errstr arguments are present they will be set to indicate the actual system-level error that occurred in the system-level socket(), bind(), and listen() calls. If the value returned in errno is 0 and the function returned false, it is an indication that the error occurred before the bind() call. This is most likely due to a problem initializing the socket. Note that the errno and errstr arguments will always be passed by reference.
$errstr string null, See errno description.
$flags int null, A bitmask field which may be set to any combination of socket creation flags.
$context resource null

Return values

resource

the created stream, or false on error.

Other resources

Official stream-socket-server documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.