A custom Application Adapter can override the following methods providing access to various steps in the messaging application life cycle.
| Event | Description |
|---|---|
public virtual bool AppStart(IScope application) |
Called when an application scope is started. (FCS onAppStart event) |
public virtual bool RoomStart(IScope room) |
Called when a room scope is started. |
public virtual bool AppConnect(IConnection connection, object[] parameters) |
Called every time a new client connects to the application. |
public virtual bool RoomConnect(IConnection connection, object[] parameters) |
Called every time a new client connects to the application (room). |
public virtual bool AppJoin(IClient client, IScope application) |
Called every time client joins application scope. This event is called after the connection is established. |
public virtual bool RoomJoin(IClient client, IScope room) |
Called every time client joins room scope. This event is called after the connection is established. |
public virtual bool RoomLeave(IClient client, IScope room) |
Called every time client leaves room scope. This event is called before the connection is disconnected from the scope. |
public virtual bool AppLeave(IClient client, IScope application) |
Called every time client leaves application scope. This event is called before the connection is disconnected from the scope. |
public virtual bool RoomDisconnect(IConnection connection) |
Called every time client disconnects from the application. |
public virtual bool AppDisconnect(IConnection connection) |
Called every time client disconnects from the application. |
public virtual bool RoomStop(IScope room) |
Called when a room scope is stopped. |
public virtual bool AppStop(IScope application) |
Called when an application scope is stopped. (FCS onAppStop event) |
Assuming that the client is connecting to rtmp://server/app/room1/room2
At first, the connection is established, so the user "connects" to all scopes that are traversed up to room2:
After the connection is established, the client object is retrieved and if it is the first connection by this client to the scope, joins the scopes:
If the same client establishes a second connection to the same scope, only the connect methods will be called. If you connect to partially the same scopes, only a few join methods might be called, e.g. rtmp://server/app/room1/room3 will trigger: