Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
web::ng::impl::WsConnectionBase Class Referenceabstract
Inheritance diagram for web::ng::impl::WsConnectionBase:
Collaboration diagram for web::ng::impl::WsConnectionBase:

Public Member Functions

virtual std::optional< Error > sendBuffer (boost::asio::const_buffer buffer, boost::asio::yield_context yield)=0
 
 Connection (std::string ip, boost::beast::flat_buffer buffer, util::TagDecoratorFactory const &tagDecoratorFactory)
 Construct a new Connection object.
 
- Public Member Functions inherited from web::ng::Connection
 Connection (std::string ip, boost::beast::flat_buffer buffer, util::TagDecoratorFactory const &tagDecoratorFactory)
 Construct a new Connection object.
 
virtual void setTimeout (std::chrono::steady_clock::duration newTimeout)=0
 Get the timeout for send, receive, and close operations. For WebSocket connections, this is the ping interval.
 
virtual std::optional< Error > send (Response response, boost::asio::yield_context yield)=0
 Send a response to the client.
 
virtual std::expected< Request, Error > receive (boost::asio::yield_context yield)=0
 Receive a request from the client.
 
virtual void close (boost::asio::yield_context yield)=0
 Gracefully close the connection.
 
- Public Member Functions inherited from util::Taggable
 Taggable (Taggable &&)=default
 
Taggableoperator= (Taggable &&)=default
 
BaseTagDecorator const & tag () const
 Getter for tag decorator.
 

Additional Inherited Members

- Static Public Attributes inherited from web::ng::Connection
static constexpr std::chrono::steady_clock::duration kDEFAULT_TIMEOUT = std::chrono::seconds{11}
 The default timeout for send, receive, and close operations.
 
- Protected Member Functions inherited from util::Taggable
 Taggable (util::TagDecoratorFactory const &tagFactory)
 New Taggable from a specified factory.
 
- Protected Attributes inherited from web::ng::Connection
boost::beast::flat_buffer buffer_
 

Member Function Documentation

◆ Connection()

web::ng::Connection::Connection ( std::string ip,
boost::beast::flat_buffer buffer,
util::TagDecoratorFactory const & tagDecoratorFactory )

Construct a new Connection object.

Parameters
ipThe client ip.
bufferThe buffer to use for reading and writing.
tagDecoratorFactoryThe factory for creating tag decorators.

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