Type Alias SocketEvents
bounced: [packet: BouncedPacket, data: JSONRecord];
connected: [packet: ConnectedPacket];
connectionRefused: [packet: ConnectionRefusedPacket];
dataPackage: [packet: DataPackagePacket];
disconnected: [];
invalidPacket: [packet: InvalidPacketPacket];
locationInfo: [packet: LocationInfoPacket];
printJSON: [packet: PrintJSONPacket];
receivedItems: [packet: ReceivedItemsPacket];
receivedPacket: [packet: ServerPacket];
retrieved: [packet: RetrievedPacket];
roomInfo: [packet: RoomInfoPacket];
roomUpdate: [packet: RoomUpdatePacket];
sentPackets: [packets: ClientPacket[]];
setReply: [packet: SetReplyPacket];
}
Type declaration
bounced: [packet: BouncedPacket, data: JSONRecord]
Fires when the client receives a BouncedPacket.
Param: packet
The raw BouncedPacket.
connected: [packet: ConnectedPacket]
Fires when the client receives a ConnectedPacket
Param: packet
The raw ConnectedPacket packet.
connection
Refused : [packet: ConnectionRefusedPacket]Fires when the client receives a ConnectionRefusedPacket.
Param: packet
The raw ConnectionRefusedPacket.
data
Package : [packet: DataPackagePacket]Fires when the client receives a DataPackagePacket.
Param: packet
The raw DataPackagePacket.
disconnected: []
Fires when the client has lost connection to the server, intentionally or not.
invalid
Packet : [packet: InvalidPacketPacket]Fires when the client receives a InvalidPacketPacket.
Param: packet
The raw InvalidPacketPacket.
location
Info : [packet: LocationInfoPacket]Fires when the client receives a LocationInfoPacket.
Param: packet
The raw LocationInfoPacket.
printJSON: [packet: PrintJSONPacket]
Fires when the client receives a PrintJSONPacket.
Param: packet
The raw PrintJSONPacket packet.
received
Items : [packet: ReceivedItemsPacket]Fires when the client receives a ReceivedItemsPacket.
Param: packet
The raw ReceivedItemsPacket.
received
Packet : [packet: ServerPacket]Fires when the client receives any ServerPacket.
Param: packet
Any received ServerPacket. Additional checks on the
cmd
property will be required to determine the type of packet received.retrieved: [packet: RetrievedPacket]
Fires when the client receives a RetrievedPacket.
Param: packet
The raw RetrievedPacket.
room
Info : [packet: RoomInfoPacket]Fires when the client receives a RoomInfoPacket.
Param: packet
The raw RoomInfoPacket.
room
Update : [packet: RoomUpdatePacket]Fires when the client receives a RoomUpdatePacket.
Param: packet
The raw RoomUpdatePacket.
sent
Packets : [packets: ClientPacket[]]Fires when the client sends an array of ClientPacket.
Param: packets
An array of ClientPacket sent to the server.
set
Reply : [packet: SetReplyPacket]Fires when the client receives a SetReplyPacket.
Param: packet
The raw SetReplyPacket.
An interface with all supported socket events and their respective callback arguments. To be called from SocketManager.