Beispiel #1
0
 private void _acceptor_OnClientDisconnected(object sender, ClientDisconnectedEventArgs args)
 {
     try
     {
         _initiator.CloseSocket();
         _pendingBytes = 0;
     }
     catch (Exception ex)
     {
         logger.Error("_acceptor_OnClientDisconnected(): " + ex.Message, ex);
     }
 }
Beispiel #2
0
        private void NotificaClienteDesconectado(object objeto)
        {
            ClientSocketPacket socketData = (ClientSocketPacket)objeto;

            ClientDisconnectedEventArgs args = new ClientDisconnectedEventArgs();

            args.ClientNumber = socketData.ClientNumber;
            args.ClientSocket = socketData.CurrentSocket;

            if (OnClientDisconnected != null)
            {
                OnClientDisconnected(this, args);
            }
        }
Beispiel #3
0
        private void _initiator_OnClientDisconnected(object sender, ClientDisconnectedEventArgs args)
        {
            try
            {
                logger.Error("_initiator_OnClientDisconnected: desconectou [" + args.ClientNumber + "]");
                compressedStream = new MemoryStream();
                //zlib = new Ionic.Zlib.ZlibStream(compressedStream, Ionic.Zlib.CompressionMode.Decompress, true);
                //zlib.BufferSize = BUFFER_SIZE;
                zlib          = new ICSharpCode.SharpZipLib.Zip.Compression.Inflater();
                _pendingBytes = 0;

                //zlib.FlushMode = Ionic.Zlib.FlushType.Full;
            }
            catch (Exception ex)
            {
                logger.Error("_initiator_OnClientDisconnected: " + ex.Message, ex);
            }
        }