happy-monkey / websocket-server
There is no license information available for the latest version (1.0.22) of this package.
1.0.22
2022-05-27 06:59 UTC
Requires
- ext-json: *
- cboden/ratchet: ^0.4.2
- league/event: ^2.2
README
Install
composer require happy-monkey/websocket-server
Messages format
{
"action": "actionName",
"data": mixed | null,
"room": "room_id" | null
}
If a message is received, server will look for a method called onActionName
and execute it. Callback will take 3 arguments :
- Client object of sender
- Data of message
- Room object if a room with
room_id
if exists
Angular WebSocket client service
See https://www.npmjs.com/package/@happymonkey/websocket-client