private ConnectionIdentification IdentifyConnection(byte[] buffer, int size) { var data = new byte[size]; Array.Copy(buffer, data, size); return(SerializationManager <ConnectionIdentification> .Desserialize(data)); }
private void ComputeServerRequest(byte[] buffer, int size) { var bArray = new byte[size]; Array.Copy(buffer, bArray, size); listener.NewListReceived(SerializationManager <ServerUpdate> .Desserialize(bArray)); }
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)); }