示例#1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="ClientConnectedEventArgs" /> class.
        /// </summary>
        /// <param name="socket">The channel.</param>
        public SocketEventArgs(Socket socket)
        {
            if (socket == null) throw new ArgumentNullException("socket");

            Channel = new SocketChannel();
            ChannelBuffer = new SocketBuffer();
            Channel.Assign(socket);
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="ClientConnectedEventArgs" /> class.
        /// </summary>
        /// <param name="socket">The channel.</param>
        /// <param name="messageBuffer">The message buffer.</param>
        public ClientConnectedEventArgs(Socket socket, int messageBuffer)
        {
            if (socket == null) throw new ArgumentNullException("socket");

            AllowConnect = true;

            Channel = new SocketChannel();
            ChannelBuffer = new SocketBuffer(messageBuffer);
            Channel.Assign(socket);
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="ClientConnectedEventArgs" /> class.
        /// </summary>
        /// <param name="socket">The channel.</param>
        public SocketEventArgs(Socket socket)
        {
            if (socket == null)
            {
                throw new ArgumentNullException("socket");
            }

            Channel       = new SocketChannel();
            ChannelBuffer = new SocketBuffer();
            Channel.Assign(socket);
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="ClientConnectedEventArgs" /> class.
        /// </summary>
        /// <param name="socket">The channel.</param>
        /// <param name="messageBuffer">The message buffer.</param>
        public ClientConnectedEventArgs(Socket socket, int messageBuffer)
        {
            if (socket == null)
            {
                throw new ArgumentNullException("socket");
            }

            AllowConnect = true;

            Channel       = new SocketChannel();
            ChannelBuffer = new SocketBuffer(messageBuffer);
            Channel.Assign(socket);
        }