Пример #1
0
        public void SaveLoadClDisconnect()
        {
            // arrange
            var msg = new ClDisconnect();

            // act, assert (no data, just save and load)
            MultiprotocolSaveLoad(msg, null);
        }
Пример #2
0
        public override void Disconnect()
        {
            if (disconnecting || !Connected)
            {
                return;
            }
            var msg = new ClDisconnect();

            svcMessages.Enqueue(msg);
        }
Пример #3
0
 public override void Disconnect()
 {
     Root.Log(LogLevel.Info, "Client: disconnect");
     if (!disconnectReceived)
     {
         var msg = new ClDisconnect();
         Send(msg);
     }
     clSocket.Shutdown(SocketShutdown.Both);
     Reset();
 }
Пример #4
0
        private void OnClDisconnect(ClDisconnect msg, ClientId id)
        {
            if (id == ClientId.Server)
            {
                InternalDisconnect();
                return;
            }
            var cl = clients[id];

            Root.Log(LogLevel.Info, "Client {0} : disconnect", GetClientName(cl));
            DisconnectClient(cl);
        }