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

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