/// <summary> /// Starts the server /// </summary> public void Start() { if (_udpListenerCount > 0) { _availableUdpListener = _udpListenerCount; _udpListener = new UdpListener(_bindEndPoint); StartUdpListen(); } if (_tcpListenerCount > 0) { _availableTcpListener = _tcpListenerCount; _tcpListener = new TcpListener(_bindEndPoint); _tcpListener.Start(); StartTcpAcceptConnection(); } }
/// <summary> /// Starts the server /// </summary> public void Start() { if (_udpListenerCount > 0) { _udpListener = new UdpListener(_bindEndPoint); for (int i = 0; i < _udpListenerCount; i++) { StartUdpListen(); } } if (_tcpListenerCount > 0) { _tcpListener = new TcpListener(_bindEndPoint); _tcpListener.Start(); for (int i = 0; i < _tcpListenerCount; i++) { StartTcpAcceptConnection(); } } }