예제 #1
0
            // Deseriaizes response data
            public static Request Deserialize(byte[] Data)
            {
                // Deserialize data
                PortableStorage Storage = new PortableStorage();

                Storage.Deserialize(Data);

                // Populate and return new response
                return(new Request
                {
                    PayloadData = CoreSyncData.Deserialize(Storage.GetEntry("payload_data"))
                });
            }
예제 #2
0
            // Deseriaizes response data
            public static Response Deserialize(byte[] Data)
            {
                // Deserialize data
                PortableStorage Storage = new PortableStorage();

                Storage.Deserialize(Data);

                // Populate and return new response
                return(new Response
                {
                    LocalTime = (ulong)Storage.GetEntry("local_time"),
                    PayloadData = CoreSyncData.Deserialize(Storage.GetEntry("payload_data")),
                    LocalPeerlist = Storage.DeserializeArrayFromBinary <PeerlistEntry>("local_peerlist")
                });
            }