Add SessionControllerConnected event

This commit is contained in:
Ionut Andrei Oanca
2020-12-07 01:04:48 +01:00
parent a7b461adb4
commit 0825ce687d
4 changed files with 32 additions and 3 deletions

View File

@@ -128,6 +128,9 @@ namespace Emby.Server.Implementations.Session
/// <inheritdoc />
public event EventHandler<SessionEventArgs> SessionActivity;
/// <inheritdoc />
public event EventHandler<SessionEventArgs> SessionControllerConnected;
/// <summary>
/// Gets all connections.
/// </summary>
@@ -312,6 +315,19 @@ namespace Emby.Server.Implementations.Session
return session;
}
/// <inheritdoc />
public void OnSessionControllerConnected(SessionInfo info)
{
EventHelper.QueueEventIfNotNull(
SessionControllerConnected,
this,
new SessionEventArgs
{
SessionInfo = info
},
_logger);
}
/// <inheritdoc />
public void CloseIfNeeded(SessionInfo session)
{

View File

@@ -133,6 +133,8 @@ namespace Emby.Server.Implementations.Session
var controller = (WebSocketController)controllerInfo.Item1;
controller.AddWebSocket(connection);
_sessionManager.OnSessionControllerConnected(session);
}
/// <summary>