|
CatapultServer
v0.5.0.1 (Elephant)
|
Context passed to a server packet handler function. More...


Public Member Functions | |
| ServerPacketHandlerContext (const Key &key, const std::string &host) | |
| Creates a context around key and \ host. More... | |
| const Key & | key () const |
| Gets the public key associated with the client. More... | |
| const std::string & | host () const |
| Gets the host associated with the client. More... | |
| bool | hasResponse () const |
Returns true if a response has been associated with this context. More... | |
| const PacketPayload & | response () const |
| Gets the response associated with this context. More... | |
| void | response (PacketPayload &&payload) |
| Sets payload as the response associated with this context. More... | |
Public Member Functions inherited from catapult::utils::MoveOnly | |
| constexpr | MoveOnly ()=default |
| Default constructor. More... | |
| ~MoveOnly ()=default | |
| Default destructor. More... | |
| MoveOnly (const NonCopyable &)=delete | |
| Disabled copy constructor. More... | |
| MoveOnly (MoveOnly &&)=default | |
| Default move constructor. More... | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| Disabled assignment operator. More... | |
| MoveOnly & | operator= (MoveOnly &&)=default |
| Default move assignment operator. More... | |
Private Attributes | |
| const Key & | m_key |
| const std::string & | m_host |
| bool | m_hasResponse |
| PacketPayload | m_payload |
Context passed to a server packet handler function.
|
explicit |
Creates a context around key and \ host.
| bool catapult::ionet::ServerPacketHandlerContext::hasResponse | ( | ) | const |
Returns true if a response has been associated with this context.

| const std::string & catapult::ionet::ServerPacketHandlerContext::host | ( | ) | const |
Gets the host associated with the client.
| const Key & catapult::ionet::ServerPacketHandlerContext::key | ( | ) | const |
Gets the public key associated with the client.
| const PacketPayload & catapult::ionet::ServerPacketHandlerContext::response | ( | ) | const |
Gets the response associated with this context.


| void catapult::ionet::ServerPacketHandlerContext::response | ( | PacketPayload && | payload | ) |
Sets payload as the response associated with this context.

|
private |
|
private |
|
private |
|
private |