Exemple #1
0
        protected void StartReceiving(Socket socket)
        {
            var receiveVO = new ReceiveVO
            {
                socket = socket,
                buffer = new byte[socket.ReceiveBufferSize]
            };

            Receive(receiveVO);
        }
Exemple #2
0
 protected void Receive(ReceiveVO receiveVO)
 {
     receiveVO.socket.BeginReceive(receiveVO.buffer, 0, receiveVO.buffer.Length, SocketFlags.None, OnReceived, receiveVO);
 }
Exemple #3
0
 protected void TriggerOnReceive(ReceiveVO receiveVO, int bytesReceived)
 {
     OnReceive?.Invoke(this, new ReceiveEventArgs(receiveVO.socket, TrimmedBuffer(receiveVO.buffer, bytesReceived)));
 }