nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Gateway Class Reference

#include <gateway.h>

Public Member Functions

 Gateway (const Gateway &)=delete
Gateway & operator= (const Gateway &)=delete
uint16_t port () const

Static Public Member Functions

static absl::StatusOr< std::unique_ptr< Gateway > > Create (asio::io_context &io, uint16_t port, asio::ssl::context &tls, Route route)
 Listens on the port (0 for any), or returns why it can't.

Static Public Attributes

static constexpr std::size_t kMaxMessage = 64 * 1024
 A page's message larger than this is refused, as the servers would.

Detailed Description

Lets a browser's page reach the servers, which a page can't open a socket to: it takes WebSocket connections, and relays each one's messages to a server over TLS, and the server's bytes back, as they are.

Definition at line 40 of file gateway.h.

Constructor & Destructor Documentation

◆ Gateway()

nanommo::Gateway::Gateway ( const Gateway & )
delete

Member Function Documentation

◆ Create()

absl::StatusOr< std::unique_ptr< Gateway > > nanommo::Gateway::Create ( asio::io_context & io,
uint16_t port,
asio::ssl::context & tls,
Route route )
static

Listens on the port (0 for any), or returns why it can't.

Definition at line 387 of file gateway.cc.

◆ operator=()

Gateway & nanommo::Gateway::operator= ( const Gateway & )
delete

◆ port()

uint16_t nanommo::Gateway::port ( ) const
inline

Definition at line 53 of file gateway.h.

Member Data Documentation

◆ kMaxMessage

std::size_t nanommo::Gateway::kMaxMessage = 64 * 1024
staticconstexpr

A page's message larger than this is refused, as the servers would.

Definition at line 43 of file gateway.h.


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