20#ifndef RIPPLE_SERVER_SESSION_H_INCLUDED
21#define RIPPLE_SERVER_SESSION_H_INCLUDED
23#include <xrpl/beast/net/IPEndpoint.h>
24#include <xrpl/beast/utility/Journal.h>
25#include <xrpl/server/WSSession.h>
26#include <xrpl/server/Writer.h>
28#include <boost/beast/http/message.hpp>
82 template <
typename BufferSequence>
84 write(BufferSequence
const& buffers)
86 for (
typename BufferSequence::const_iterator iter(buffers.begin());
87 iter != buffers.end();
90 typename BufferSequence::value_type
const& buffer(*iter);
92 boost::asio::buffer_cast<void const*>(buffer),
93 boost::asio::buffer_size(buffer));
A version-independent IP address and port combination.
A generic endpoint for log messages.
Persistent state information for a connection session.
virtual std::shared_ptr< WSSession > websocketUpgrade()=0
Convert the connection to WebSocket.
virtual beast::IP::Endpoint remoteAddress()=0
Returns the remote address of the connection.
virtual Port const & port()=0
Returns the Port settings for this connection.
virtual std::shared_ptr< Session > detach()=0
Detach the session.
Session(Session const &)=delete
virtual void close(bool graceful)=0
Close the session.
virtual http_request_type & request()=0
Returns the current HTTP request.
virtual ~Session()=default
virtual void write(std::shared_ptr< Writer > const &writer, bool keep_alive)=0
void write(std::string const &s)
Send a copy of data asynchronously.
void * tag
A user-definable pointer.
virtual beast::Journal journal()=0
Returns the Journal to use for logging.
void write(BufferSequence const &buffers)
Session & operator=(Session const &)=delete
virtual void write(void const *buffer, std::size_t bytes)=0
virtual void complete()=0
Indicate that the response is complete.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::beast::http::request< boost::beast::http::dynamic_body > http_request_type
Configuration information for a Server listening port.