Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void RaiseSessionClosed(IWampConnection <TMessage> connection)
        {
            EventHandler <WampSessionEventArgs> sessionClosed = SessionClosed;

            if (sessionClosed != null)
            {
                IWampClient client = ClientContainer.GetClient(connection);
                sessionClosed(this, new WampSessionEventArgs(client.SessionId));
            }
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }