示例#1
0
        private ConnectionIdentification IdentifyConnection(byte[] buffer, int size)
        {
            var data = new byte[size];

            Array.Copy(buffer, data, size);

            return(SerializationManager <ConnectionIdentification> .Desserialize(data));
        }
示例#2
0
        private void ComputeServerRequest(byte[] buffer, int size)
        {
            var bArray = new byte[size];

            Array.Copy(buffer, bArray, size);

            listener.NewListReceived(SerializationManager <ServerUpdate> .Desserialize(bArray));
        }
示例#3
0
        private SocketRequestCommunication DecodeSocketCommunication(byte[] buffer, int size)
        {
            var bArray = new byte[size];

            Array.Copy(buffer, bArray, size);

            String json = Encoding.ASCII.GetString(bArray);

            return(SerializationManager <SocketRequestCommunication> .Desserialize(bArray));
        }