prepare() prepare() : \adminmatrix\swoole\contract\websocket\RoomInterface Do some init stuffs before workers started. Returns \adminmatrix\swoole\contract\websocket\RoomInterface —
add() add(string $fd, array|string $roomNames) : mixed Add multiple socket fds to a room. Parameters string $fd array|string $roomNames Returns mixed —
delete() delete(string $fd, array|string $roomNames) : mixed Delete multiple socket fds from a room. Parameters string $fd array|string $roomNames Returns mixed —
getClients() getClients(string $room) : array Get all sockets by a room key. Parameters string $room Returns array —