/// <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); } }; }
/// <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); }; }