Results of 1 - 1 of about 1 for orphaned (0.000 sec.)
- EventHttpConnection::setCloseCallback — Set callback for connection close | PHP... 9414
- EventHttpConnection::setCloseCallback (PECL event >= 1.8.0) EventHttpConnection::setCloseCallback — Set callback for connection close 説明 public function EventHttpConnection::setCloseCallback ( callable $callback , mixed $data = ? ): void
... lback. * The script should output "_close_callback" string to standard output. * * 5) Check if the server's process has no orphaned connections, * e.g. with `lsof` utility. */ function _close_callback ( $conn ) { echo __FUNCTION__ , PHP_EOL ; } function ... and the server is not notified about terminated connections. So each time client terminates connection abruptly, we get an orphaned connection. For instance, the following is a part of `lsof -p $PID | grep TCP` command after client has terminated connect ... localhost:4242->localhost:37375 (CLOSE_WAIT) where $PID is our process ID. The following block of code fixes such kind of orphaned connections. */ $bev = $req -> getBufferEvent (); $bev -> enable ( Event :: READ ); // We have to free it explicitly. See ...
-
https://man.mtool.work/php/8.3/eventhttpconnection.setclosecallback.html
PREV
1
NEXT