/// <summary> /// constructor /// </summary> /// <param name="udpListener"> /// a UdpClient that specifies the listener. /// </param> /// <param name="udpServerTransport"> /// a UdpServerTransport that represents the owner of listener. /// </param> /// <param name="isLspHooked"> /// a bool value that indicates whether lsp hooked the transport. /// </param> /// <exception cref="ArgumentNullException"> /// thrown when tcpListener is null. /// </exception> /// <exception cref="ArgumentNullException"> /// thrown when tcpServerTransport is null. /// </exception> public UdpServerListener(UdpClient udpListener, UdpServerTransport udpServerTransport, bool isLspHooked) { if (udpListener == null) { throw new ArgumentNullException("udpListener"); } if (udpServerTransport == null) { throw new ArgumentNullException("udpServerTransport"); } this.lspHooked = isLspHooked; this.listener = udpListener; this.server = udpServerTransport; this.thread = new ThreadManager(UdpServerListenerReceiveLoop, Unblock); }
/// <summary> /// constructor /// </summary> /// <param name="udpListener"> /// a UdpClient that specifies the listener. /// </param> /// <param name="udpServerTransport"> /// a UdpServerTransport that represents the owner of listener. /// </param> /// <param name="isLspHooked"> /// a bool value that indicates whether lsp hooked the transport. /// </param> /// <exception cref="ArgumentNullException"> /// thrown when tcpListener is null. /// </exception> /// <exception cref="ArgumentNullException"> /// thrown when tcpServerTransport is null. /// </exception> public UdpServerListener(UdpClient udpListener, UdpServerTransport udpServerTransport, bool isLspHooked) { if (udpListener == null) { throw new ArgumentNullException("udpListener"); } if (udpServerTransport == null) { throw new ArgumentNullException("udpServerTransport"); } this.lspHooked = isLspHooked; this.listener = udpListener; this.server = udpServerTransport; this.thread = new ThreadManager(UdpServerListenerReceiveLoop, Unblock); }