Example #1
0
 protected void triggerOnReceive(ReceiveVO receiveVO, int bytesReceived)
 {
     if (OnReceive != null)
     {
         OnReceive(this, new ReceiveEventArgs(receiveVO.socket,
                                              trimmedBuffer(receiveVO.buffer, bytesReceived)));
     }
 }
Example #2
0
        protected void startReceiving(Socket socket)
        {
            var receiveVO = new ReceiveVO {
                socket = socket,
                buffer = new byte[socket.ReceiveBufferSize]
            };

            receive(receiveVO);
        }
Example #3
0
 protected void receive(ReceiveVO receiveVO)
 {
     receiveVO.socket.BeginReceive(receiveVO.buffer, 0,
                                   receiveVO.buffer.Length, SocketFlags.None, onReceived, receiveVO);
 }
Example #4
0
 protected void triggerOnReceive(ReceiveVO receiveVO, int bytesReceived)
 {
     if (OnReceive != null) {
         OnReceive(this, new ReceiveEventArgs(receiveVO.socket,
             trimmedBuffer(receiveVO.buffer, bytesReceived)));
     }
 }
Example #5
0
 protected void startReceiving(Socket socket)
 {
     var receiveVO = new ReceiveVO {
         socket = socket,
         buffer = new byte[socket.ReceiveBufferSize]
     };
     receive(receiveVO);
 }
Example #6
0
 protected void receive(ReceiveVO receiveVO)
 {
     receiveVO.socket.BeginReceive(receiveVO.buffer, 0,
         receiveVO.buffer.Length, SocketFlags.None, onReceived, receiveVO);
 }