Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Stroika::Frameworks::WebServer::Message Class Reference

#include <Message.h>

Public Member Functions

 Message ()=delete
 
nonvirtual String ToString () const
 

Public Attributes

Common::ReadOnlyProperty< optional< IO::Network::SocketAddress > > peerAddress
 
Common::ReadOnlyProperty< const Request & > request
 
Common::ReadOnlyProperty< Request & > rwRequest
 
Common::ReadOnlyProperty< const Response & > response
 
Common::ReadOnlyProperty< Response & > rwResponse
 

Detailed Description

A message refers to a single back-and-forth request/response pair exchanged over HTTP.

Note
Satisfies Concepts: o static_assert (not copyable<Message>); o static_assert (movable<Message>);
Thread-Safety C++-Standard-Thread-Safety

Definition at line 35 of file Message.h.

Constructor & Destructor Documentation

◆ Message()

Stroika::Frameworks::WebServer::Message::Message ( )
delete
Note
that a Message is not copyable (but is movable). Typically its passed around by reference.

Member Function Documentation

◆ ToString()

String Message::ToString ( ) const
See also
Characters::ToString ();

Definition at line 75 of file Message.cpp.

Member Data Documentation

◆ peerAddress

Common::ReadOnlyProperty<optional<IO::Network::SocketAddress> > Stroika::Frameworks::WebServer::Message::peerAddress

This is the network address where the message (request) came from and where the message response is going to be returned to. This can be sometimes omitted/unknown (HOW UNKNOWN - TBD DOCUMENT)

See also
ConnectionOrientedStreamSocket::Ptr::GetPeerAddress

Definition at line 66 of file Message.h.

◆ request

Common::ReadOnlyProperty<const Request&> Stroika::Frameworks::WebServer::Message::request

Returns a read-only reference (so not assignable to) to a const Request& (so cannot modify the request).

Definition at line 72 of file Message.h.

◆ rwRequest

Common::ReadOnlyProperty<Request&> Stroika::Frameworks::WebServer::Message::rwRequest

Returns a read-only reference (so not assignable) to a Request& (so CAN modify the request). This should very rarely be used (just perhaps when constructing the original message). Generally use request instead.

Definition at line 80 of file Message.h.

◆ response

Common::ReadOnlyProperty<const Response&> Stroika::Frameworks::WebServer::Message::response

Returns a read-only reference (so not assignable) to a const Response& (so cannot modify the response).

Definition at line 86 of file Message.h.

◆ rwResponse

Common::ReadOnlyProperty<Response&> Stroika::Frameworks::WebServer::Message::rwResponse

Returns a read-only reference (so not assignable) to a Response& (so CAN modify the response). Typically, users will want to access the 'rwResponse' not the 'response', since the underlying response object is frequently being updated.

Definition at line 93 of file Message.h.


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