Example #1
0
 public Context(SocketController controller)
 {
     _controller       = controller;
     _size             = new ByteTransmitter(controller.Socket, 4);
     _size.OnReceived += new ReceivedEvent(_size_OnReceived);
     _size.BeginReceive();
 }
Example #2
0
        private void SendDirect(byte[] ABuffer)
        {
            var t = new ByteTransmitter(_socket, ABuffer, this);

            t.OnSendComplete += new SendCompleteEvent(t_OnSendComplete);
            t.SendMessage();
        }
Example #3
0
 void _size_OnReceived(byte[] Data)
 {
     var size = BitConverter.ToInt32(Data, 0);
     _message = new ByteTransmitter(_socket, size, _io);
     _message.OnReceived += new ReceivedEvent(_message_OnReceived);
     _message.BeginReceive();
 }
Example #4
0
        void _size_OnReceived(byte[] Data)
        {
            var size = BitConverter.ToInt32(Data, 0);

            _message             = new ByteTransmitter(_socket, size, _io);
            _message.OnReceived += new ReceivedEvent(_message_OnReceived);
            _message.BeginReceive();
        }
Example #5
0
        public ByteReceiver(Socket socket, IIOCPSocketController IO)
        {
            _io     = IO;
            _socket = socket;
            _size   = new ByteTransmitter(socket, 4, IO);

            _size.OnReceived += new ReceivedEvent(_size_OnReceived);
        }
Example #6
0
        public ByteReceiver(Socket socket, IIOCPSocketController IO)
        {
            _io = IO;
            _socket = socket;
            _size = new ByteTransmitter(socket, 4, IO);

            _size.OnReceived += new ReceivedEvent(_size_OnReceived);
        }
Example #7
0
 private void SendDirect(byte[] ABuffer)
 {
     var t = new ByteTransmitter(_socket, ABuffer, this);
     t.OnSendComplete += new SendCompleteEvent(t_OnSendComplete);
     t.SendMessage();
 }