Exemplo n.º 1
0
 /// <summary>
 /// WebSocket结束
 /// </summary>
 protected override void webSocketEnd()
 {
     Interlocked.Increment(ref identity);
     webSocket.socket webSocket = webSocketReceiver.WebSocket;
     webSocketReceiver.WebSocket = null;
     pub.Dispose(ref SslStream);
     pub.Dispose(ref networkStream);
     if (Socket != null)
     {
         fastCSharp.threading.disposeTimer.Default.addSocketClose(Socket);
     }
     webSocket.Close();
     if (Ipv6.Ip == null)
     {
         if ((Socket = server.SocketEnd(Ipv4)) != null)
         {
             start();
             return;
         }
     }
     else
     {
         if ((Socket = server.SocketEnd(ref Ipv6)) != null)
         {
             start();
             return;
         }
         Ipv6.Null();
     }
     typePool <sslStream> .PushNotNull(this);
 }
Exemplo n.º 2
0
 /// <summary>
 /// HTTP头部接收错误
 /// </summary>
 protected override void headerError()
 {
     form.Clear();
     pub.Dispose(ref SslStream);
     pub.Dispose(ref networkStream);
     if (Socket != null)
     {
         fastCSharp.threading.disposeTimer.Default.addSocketClose(Socket);
     }
     if (Ipv6.Ip == null)
     {
         if ((Socket = server.SocketEnd(Ipv4)) != null)
         {
             start();
             return;
         }
     }
     else
     {
         if ((Socket = server.SocketEnd(ref Ipv6)) != null)
         {
             start();
             return;
         }
         Ipv6.Null();
     }
     typePool <sslStream> .PushNotNull(this);
 }