Skip to content

Emitted events

This flow-chart represents a SocketManager's lifecycle and locally generated events (light blue colored rounded rectangles).

Events Flowchart

As described both in the Default events and Special Events sections, connect and error are special events witch means they have concrete parameters. Other emitted events have no parameters (other than the possibility of injecting SocketManager and Socket instances):

Example

1
2
3
4
manager.Socket.On("connecting", () => Debug.Log("connecting"));
manager.Socket.On("reconnect", () => Debug.Log("reconnect"));
manager.Socket.On("reconnecting", () => Debug.Log("reconnecting"));
// ...

Comments