Swoole\WebSocket\Server->disconnect

Declaration

<?php
Swoole\WebSocket\Server->disconnect (int $fd)

Parameters

fd

The fd of the WebSocket connection, it can be get from the frame.

Return

success

if success, it returns TRUE, otherwise it returns FALSE.

Description

Disconnect the connection from server side.

Example