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