Example #1
0
        /// <summary>
        /// new
        /// </summary>
        /// <param name="port"></param>
        /// <param name="messageBufferSize"></param>
        /// <param name="protocol"></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,
                         Protocol.IUdpProtocol <TCommandInfo> protocol,
                         AbsUdpService <TCommandInfo> service)
        {
            if (protocol == null)
            {
                throw new ArgumentNullException("protocol");
            }
            if (service == null)
            {
                throw new ArgumentNullException("service");
            }

            this._port = port;
            this._messageBufferSize = messageBufferSize;
            this._protocol          = protocol;
            this._service           = service;
        }
Example #2
0
 /// <summary>
 /// new
 /// </summary>
 /// <param name="port"></param>
 /// <param name="protocol"></param>
 /// <param name="service"></param>
 public UdpServer(int port, Protocol.IUdpProtocol <TCommandInfo> protocol,
                  AbsUdpService <TCommandInfo> service)
     : this(port, 2048, protocol, service)
 {
 }