Public Member Functions | Private Attributes | List of all members
carla::streaming::detail::tcp::IncomingMessage Class Reference

Helper for reading incoming TCP messages. More...

+ Collaboration diagram for carla::streaming::detail::tcp::IncomingMessage:

Public Member Functions

boost::asio::mutable_buffer buffer ()
 IncomingMessage (Buffer &&buffer)
auto pop ()
auto size () const
boost::asio::mutable_buffer size_as_buffer ()

Private Attributes

Buffer _message
message_size_type _size = 0u

Detailed Description

Helper for reading incoming TCP messages.

Allocates the whole message in a single buffer.

Definition at line 34 of file streaming/detail/tcp/Client.cpp.

Constructor & Destructor Documentation

◆ IncomingMessage()

carla::streaming::detail::tcp::IncomingMessage::IncomingMessage ( Buffer &&  buffer)

Definition at line 37 of file streaming/detail/tcp/Client.cpp.

Member Function Documentation

◆ buffer()

boost::asio::mutable_buffer carla::streaming::detail::tcp::IncomingMessage::buffer ( )

Definition at line 43 of file streaming/detail/tcp/Client.cpp.

References _message, _size, carla::Buffer::buffer(), DEBUG_ASSERT, and carla::Buffer::reset().

+ Here is the call graph for this function:

◆ pop()

auto carla::streaming::detail::tcp::IncomingMessage::pop ( )

Definition at line 53 of file streaming/detail/tcp/Client.cpp.

References _message.

◆ size()

auto carla::streaming::detail::tcp::IncomingMessage::size ( ) const

Definition at line 49 of file streaming/detail/tcp/Client.cpp.

References _size.

◆ size_as_buffer()

boost::asio::mutable_buffer carla::streaming::detail::tcp::IncomingMessage::size_as_buffer ( )

Definition at line 39 of file streaming/detail/tcp/Client.cpp.

References _size.

Member Data Documentation

◆ _message

Buffer carla::streaming::detail::tcp::IncomingMessage::_message

Definition at line 61 of file streaming/detail/tcp/Client.cpp.

Referenced by buffer(), and pop().

◆ _size

message_size_type carla::streaming::detail::tcp::IncomingMessage::_size = 0u

Definition at line 59 of file streaming/detail/tcp/Client.cpp.

Referenced by buffer(), size(), and size_as_buffer().

The documentation for this class was generated from the following file: