PHP » socket_close
socket_close() closes the socket resource given by socket. This function is specific to sockets and cannot be used on any other type of resources.
| Parameters | Description |
|---|---|
| socket | A valid socket resource created with socket_create() or socket_accept(). |
Return Value: No value is returned.
Example
<?php
$arrOpt = array('l_onoff' => 1, 'l_linger' => 1);
socket_set_block($this->Socket);
socket_set_option($this->Socket, SOL_SOCKET, SO_LINGER, $arrOpt);
socket_close($this->Socket);
?>

