red5: how can i get current IConnection?
-
19-09-2019 - |
Question
under the function appConnect() i added several attributes to the IConnection class of the current connected user.
i want to fetch that information in other functions, how do i get the IConnection of the current connection while i'm not in appConnect() ?
Solution
in each function the following command will provide the IConnection of the current connection:
IConnection conn = Red5.getConnectionLocal();
OTHER TIPS
In your ApplicationAdapter you can also add the connection as the first parameter like so:
public boolean isFoo(String foo)
becomes
public boolean isFoo(IConnection conn, String foo)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow