protected override void OnNewConnection(IWampConnection <TMessage> connection) { base.OnNewConnection(connection); IWampClientProxy <TMessage> client = ClientContainer.GetClient(connection); mLogger.DebugFormat("Client connected, session id: {SessionId}", client.Session); mSessionHandler.OnNewClient(client); }
private void RaiseSessionClosed(IWampConnection <TMessage> connection) { EventHandler <WampSessionEventArgs> sessionClosed = SessionClosed; if (sessionClosed != null) { IWampClient client = ClientContainer.GetClient(connection); sessionClosed(this, new WampSessionEventArgs(client.SessionId)); } }
protected override void OnCloseConnection(IWampConnection <TMessage> connection) { RaiseSessionClosed(connection); if (mLogger.IsDebugEnabled()) { IWampClient client = ClientContainer.GetClient(connection); mLogger.DebugFormat("Client disconnected, session id: {SessionId}", client.SessionId); } base.OnCloseConnection(connection); }
protected override void OnConnectionOpen(IWampConnection <TMessage> connection) { base.OnConnectionOpen(connection); IWampClient client = ClientContainer.GetClient(connection); mLogger.DebugFormat("Client connected, session id: {SessionId}", client.SessionId); client.Welcome(client.SessionId, 1, "WampSharp"); RaiseSessionCreated(client); }