示例#1
0
 /// <summary>
 /// Creates a <see cref="ServerChildTcpSocket"/> from a <see cref="Socket"/>.
 /// </summary>
 /// <param name="socket">The new socket connection to use.</param>
 internal ServerChildTcpSocket(Socket socket)
 {
     Socket = new TcpSocketImpl(socket);
     Socket.ReadCompleted = (e) => { if (ReadCompleted != null)
                                     {
                                         ReadCompleted(e);
                                     }
     };
     Socket.WriteCompleted = (e) => { if (WriteCompleted != null)
                                      {
                                          WriteCompleted(e);
                                      }
     };
     Socket.ShutdownCompleted = (e) => { if (ShutdownCompleted != null)
                                         {
                                             ShutdownCompleted(e);
                                         }
     };
 }
示例#2
0
 /// <summary>
 /// Creates a <see cref="ServerChildTcpSocket"/> from a <see cref="Socket"/>.
 /// </summary>
 /// <param name="socket">The new socket connection to use.</param>
 internal ServerChildTcpSocket(Socket socket)
 {
     Socket = new TcpSocketImpl(socket);
     Socket.ReadCompleted = (e) => { if (ReadCompleted != null) ReadCompleted(e); };
     Socket.WriteCompleted = (e) => { if (WriteCompleted != null) WriteCompleted(e); };
     Socket.ShutdownCompleted = (e) => { if (ShutdownCompleted != null) ShutdownCompleted(e); };
 }