Пример #1
0
        void ProcessStoreMessage()
        {
            RequestStoreMessage request = RequestStoreMessage.Deserialize(ProtocolParser.ReadBytes(input));
            ReplyStoreMessage   reply   = new ReplyStoreMessage();

            localRepo.StoreMessage(request.Prefix, ChunkHash.FromHashBytes(request.ChunkHash));
            ProtocolParser.WriteBytes(output, ReplyStoreMessage.SerializeToBytes(reply));
        }
Пример #2
0
        public override void StoreMessage(string prefix, ChunkHash chunkHash)
        {
            RequestStoreMessage msg = new RequestStoreMessage();

            msg.Prefix    = prefix;
            msg.ChunkHash = chunkHash.bytes;
            SendMessage(msg);

            ReplyStoreMessage.Deserialize(ProtocolParser.ReadBytes(input));
        }
Пример #3
0
 void ProcessStoreMessage()
 {
     RequestStoreMessage request = RequestStoreMessage.Deserialize (ProtocolParser.ReadBytes (input));
     ReplyStoreMessage reply = new ReplyStoreMessage ();
     localRepo.StoreMessage (request.Prefix, ChunkHash.FromHashBytes (request.ChunkHash));
     ProtocolParser.WriteBytes (output, ReplyStoreMessage.SerializeToBytes (reply));
 }