Thsi server side example demonstrates the use of the Red5 IConnectionListener interface to track connections made to the server. This includes only those connections that have successfully connected to the server (not pending ones).
A IConnectionListener object normally listens to connectiosn made to the server itself and not per
ROOM scope. This example also demosntrates how to use the IConnectionListener interface to track connectiosn made at
ROOM scope level.
Build & Deploy
To build this application : open a shell prompt in the application's project directory (where the pom.xml file resides). run the following maven command in your shell ->
mvn clean package
The above command will generate a
war file in the
target directory inside the project directory.
To deploy the war to red5 pro server :
Stop server if it is running.
Extract the content of the
war fileto directory by war name.
The java war file is simply a
archive filesimilar to
zipformat. you can extract it using a archive tool such as 7zip, Winrar trial etc
Copy the folder into
How To Use Example
This server side example simply listens for connections made to the server and logs out information if the connection was made to the example application and again logs out information when the connection disconnects from the example application.
To get the example to work you need to deploy the application to server and connect to the server side application
connection-listener-demo using RTMP or Red5 Pro Mobile SDK or Red5 pro HTML5 SDK based client and then disconnect after a few seconds. You should be able to see logging in console / log file indicating successful connection and disconnection of the client from the server side application.
You can edit the server side code in your eclipse JEE IDE such as Luna, Mars, Neon etc. To import the code into your IDE:
- Navigate to the repository folder
- Execute maven command
mvn eclipse:eclipse. This will generate files necessary for eclipse to read the maven project properly.
- In eclipse go to
File -> Import -> Existing Maven Projectsand click
- Browse and select
the project rootand Click
Finishto import the project.