/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="messageBufferSize"></param> /// <param name="_protocolHandler"></param> /// <param name="service"></param> /// <exception cref="ArgumentNullException">protocol is null.</exception> /// <exception cref="ArgumentNullException">service is null.</exception> public UdpServer(int port, int messageBufferSize, IUdpProtocolHandler <TMessage> _protocolHandler, IUdpService <TMessage> service) { this._port = port; this._messageBufferSize = messageBufferSize; this._protocolHandler = _protocolHandler ?? throw new ArgumentNullException("protocol"); this._service = service ?? throw new ArgumentNullException("service"); }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="_protocolHandler"></param> /// <param name="service"></param> public UdpServer(int port, IUdpProtocolHandler <TMessage> _protocolHandler, IUdpService <TMessage> service) : this(port, 2048, _protocolHandler, service) { }