ark::comms::HttpClientWriter

Defined in header “ark/comms/http_server.hh”.


Represents an internal writer for an HTTP client that is streaming. This allows external code (in callbacks) to “write” to a particular client.

Methods

  • void write(const std::string_view & payload)
    Allows you to write a series of bytes out over this socket, formatting the message as a websocket frame. Assumes this data is TEXT.

  • void write(const ark::core::ByteBuffer & buffer)
    Writes the given byte buffer over this socket. The server may hold onto this buffer for some period of time if necessary. Assumes this data is BINARY.

  • void clean()
    Clears out state, removing any callbacks, and preparing the writer for destruction.

Variables

  • HttpRequest initial_request
    The original request that spawned this writer.

  • HttpClientStatePtr parent_state
    A reference to the parent client ate.

  • size_t maximum_write_buffer_size= 0
    The maximum write buffer payload size.