#include <server.h>
|
| int | players () const |
| | In all its lands.
|
| int | HandOver (const std::string &host, uint16_t port) |
| uint16_t | port () const |
|
| static absl::StatusOr< std::unique_ptr< Server > > | Create (asio::io_context &io, uint16_t port, asio::ssl::context &tls, std::chrono::nanoseconds interval, std::string name, uint32_t seed, const Content &content, Metrics &metrics, Tokens &tokens, Players &players, Guilds &guilds, Events &events, Storyteller &storyteller) |
Definition at line 44 of file server.h.
◆ Create()
| absl::StatusOr< std::unique_ptr< Server > > nanommo::Server::Create |
( |
asio::io_context & | io, |
|
|
uint16_t | port, |
|
|
asio::ssl::context & | tls, |
|
|
std::chrono::nanoseconds | interval, |
|
|
std::string | name, |
|
|
uint32_t | seed, |
|
|
const Content & | content, |
|
|
Metrics & | metrics, |
|
|
Tokens & | tokens, |
|
|
Players & | players, |
|
|
Guilds & | guilds, |
|
|
Events & | events, |
|
|
Storyteller & | storyteller ) |
|
static |
Starts the server, or returns why it couldn't, such as the port being taken. Clients connect over TLS, with the context. The name keeps the world's players apart from other worlds', and the seed makes the terrain.
Definition at line 124 of file server.cc.
◆ HandOver()
| int nanommo::Server::HandOver |
( |
const std::string & | host, |
|
|
uint16_t | port ) |
Hands the players over to the world's next instance, at the host and port players reach it at: saves them, stops ticking and taking players, hands their leases to it, and tells each client where to go. Returns how many it told.
Definition at line 1067 of file server.cc.
◆ players()
| int nanommo::Server::players |
( |
| ) |
const |
◆ port()
| uint16_t nanommo::Server::port |
( |
| ) |
const |
The port it listens on, over TCP and UDP. Given port zero, Create has the system pick a free one.
Definition at line 161 of file server.cc.
The documentation for this class was generated from the following files: