@vttforge/types / SocketApi
Interface: SocketApi ​
game.socket. The second argument of a listener is the sender's user id.
Methods ​
emit() ​
emit(
channel,message,options?):void
Parameters ​
channel ​
string
message ​
unknown
options? ​
recipients? ​
readonly string[]
Returns ​
void
off() ​
off(
channel,listener?):void
Parameters ​
channel ​
string
listener? ​
(message, senderId?) => void
Returns ​
void
on() ​
on(
channel,listener):void
Parameters ​
channel ​
string
listener ​
(message, senderId?) => void
Returns ​
void