예제 #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));
        }