// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef REMOTING_PROTOCOL_MESSAGE_DECODER_H_ #define REMOTING_PROTOCOL_MESSAGE_DECODER_H_ #include "base/memory/scoped_refptr.h" #include "net/base/io_buffer.h" #include "remoting/base/compound_buffer.h" #include "third_party/protobuf/src/google/protobuf/message_lite.h" namespace remoting::protocol { // MessageDecoder uses CompoundBuffer to split the data received from the // network into separate messages. Each message is expected to be decoded in the // stream as follows: // +--------------+--------------+ // | message_size | message_data | // +--------------+--------------+ // // Here, message_size is 4-byte integer that represents size of message_data in // bytes. message_data - content of the message. class MessageDecoder { … }; } // namespace remoting::protocol #endif // REMOTING_PROTOCOL_MESSAGE_DECODER_H_