Example #1
0
 public ClientObject(TcpClient client, string address)
 {
     Tcp       = client;
     Address   = address;
     RawBuffer = new byte[RAWBUFFER_SIZE];
     Buffer    = new MiraeLockedBuffer();
 }
Example #2
0
        private void MClient_OnRead(string address, MiraeLockedBuffer buffer)
        {
            if (!mAddressMapper.ContainsKey(address))
            {
                return;
            }
            var color = mAddressMapper[address];

            var data = buffer.DequeueAll();

            foreach (var a in data)
            {
                mNetworkBlocks[color].RawBuffer.Add(a);
            }
        }