public static interface Client.Listener
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(int code,
java.lang.String reason,
boolean remote)
This event is triggered when the connection is closed.
|
void |
onError(java.lang.Exception e)
This event is triggered when some error occurs in the server.
|
void |
onMessage(java.lang.Object message)
This event is triggered when an unhandled message comes to client from server
|
void |
onOpen(java.lang.String id)
This event is triggered when the connection is accepted by the server.
|
void onOpen(java.lang.String id)
id - ColyseusId provided by the servervoid onMessage(java.lang.Object message)
message - The message from servervoid onClose(int code,
java.lang.String reason,
boolean remote)
code - The codes can be looked up here: CloseFramereason - Additional informationremote - Whether or not the closing of the connection was initiated by the remote hostvoid onError(java.lang.Exception e)