protobufReadWrite.h 620 B

123456789101112131415161718192021
  1. //
  2. // Created by miti on 21/07/19.
  3. //
  4. #ifndef DECRYPTORAPP_PROTOBUFREADWRITE_H
  5. #define DECRYPTORAPP_PROTOBUFREADWRITE_H
  6. #include <google/protobuf/message_lite.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/io/zero_copy_stream_impl.h>
  9. #include <unistd.h>
  10. #include <stdio.h>
  11. #include <iostream>
  12. namespace protobufReadWrite {
  13. using namespace google::protobuf::io;
  14. int write_protobuf_msg_to_fd(int accept_fd, google::protobuf::MessageLite& message);
  15. int read_protobuf_msg_from_fd(int accept_fd, google::protobuf::MessageLite& message);
  16. };
  17. #endif //DECRYPTORAPP_PROTOBUFREADWRITE_H