中间件底层,websocket

IBinaryStream.hpp 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //******************************************************************************
  2. // RCF - Remote Call Framework
  3. //
  4. // Copyright (c) 2005 - 2020, Delta V Software. All rights reserved.
  5. // http://www.deltavsoft.com
  6. //
  7. // RCF is distributed under dual licenses - closed source or GPL.
  8. // Consult your particular license for conditions of use.
  9. //
  10. // If you have not purchased a commercial license, you are using RCF
  11. // under GPL terms.
  12. //
  13. // Version: 3.2
  14. // Contact: support <at> deltavsoft.com
  15. //
  16. //******************************************************************************
  17. #ifndef INCLUDE_SF_IBINARYSTREAM_HPP
  18. #define INCLUDE_SF_IBINARYSTREAM_HPP
  19. #include <SF/Stream.hpp>
  20. namespace SF {
  21. /// Input stream using SF binary serialization.
  22. class IBinaryStream : public IStream
  23. {
  24. public:
  25. IBinaryStream() : IStream()
  26. {}
  27. IBinaryStream(RCF::MemIstream &is) : IStream(is)
  28. {}
  29. /// Constructs an IBinaryStream from a std::istream. Serialized data will be read from the std::istream.
  30. IBinaryStream(std::istream &is) : IStream(is)
  31. {}
  32. I_Encoding &getEncoding()
  33. {
  34. return mEncoding;
  35. }
  36. private:
  37. EncodingBinaryPortable mEncoding;
  38. };
  39. }
  40. #endif // ! INCLUDE_SF_IBINARYSTREAM_HPP