Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
Server Class Reference

Server Class. More...

#include <server.h>

Public Member Functions

 Server ()
 Construct a new Server object.
 
 ~Server ()
 Destroy the Server object.
 
void start ()
 Starts the server, blocking.
 
void stop ()
 Stops the server.
 
bool isRunning () const
 

Static Public Member Functions

static Serverinst ()
 Get the instance of the server.
 

Detailed Description

Server Class.

Class that handles mainly networking and batches everything together. The server is a singleton.

Member Function Documentation

◆ inst()

static Server * Server::inst ( )
inlinestatic

Get the instance of the server.

Simple singleton implementation.

Returns
Server* a pointer to the server.

◆ start()

void Server::start ( )

Starts the server, blocking.

Starts the client loop, binding to the config's port and address.

◆ stop()

void Server::stop ( )

Stops the server.

Stops the server on the next client loop (eg when a client connects).


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