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

#include <link.h>

Inheritance diagram for nanommo::Link:
nanommo::Connection nanommo::LocalConnection nanommo::WebSocketLink

Public Member Functions

virtual ~Link ()=default
virtual void Poll ()=0
 Takes in what's arrived, without waiting.
virtual void Send (const protocol::Input &input)=0
virtual bool connected () const =0
virtual const protocol::World & world () const =0
virtual const std::deque< protocol::Chat > & chat () const =0
 The newest lines said in the world, oldest first.
virtual int64_t whole () const =0
virtual const std::optional< protocol::Move > & move () const =0
 Where the world's instance told us to go, once it hands its players over.
virtual const protocol::Inventory & inventory () const =0
 What we carry and wear, as the world last sent it.
virtual const protocol::Quests & quests () const =0
virtual const protocol::Guild & guild () const =0
 Our guild, with no name for none.
virtual const protocol::Trade & trade () const =0
 Our trade, with nobody in it for none.
virtual const protocol::Duel & duel () const =0
 Our duel, the same.
virtual std::vector< protocol::Event > TakeEvents ()=0
virtual std::optional< protocol::GuildInvite > TakeInvite ()=0
 The guild that asked us to join since the last time, once.

Detailed Description

Where the client's world comes from, and where what the player does goes: a world server, over the network, in Connection.

Definition at line 15 of file link.h.

Constructor & Destructor Documentation

◆ ~Link()

virtual nanommo::Link::~Link ( )
virtualdefault

Member Function Documentation

◆ chat()

virtual const std::deque< protocol::Chat > & nanommo::Link::chat ( ) const
pure virtual

The newest lines said in the world, oldest first.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ connected()

virtual bool nanommo::Link::connected ( ) const
pure virtual

◆ duel()

virtual const protocol::Duel & nanommo::Link::duel ( ) const
pure virtual

Our duel, the same.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ guild()

virtual const protocol::Guild & nanommo::Link::guild ( ) const
pure virtual

Our guild, with no name for none.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ inventory()

virtual const protocol::Inventory & nanommo::Link::inventory ( ) const
pure virtual

What we carry and wear, as the world last sent it.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ move()

virtual const std::optional< protocol::Move > & nanommo::Link::move ( ) const
pure virtual

Where the world's instance told us to go, once it hands its players over.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ Poll()

virtual void nanommo::Link::Poll ( )
pure virtual

Takes in what's arrived, without waiting.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ quests()

virtual const protocol::Quests & nanommo::Link::quests ( ) const
pure virtual

◆ Send()

virtual void nanommo::Link::Send ( const protocol::Input & input)
pure virtual

◆ TakeEvents()

virtual std::vector< protocol::Event > nanommo::Link::TakeEvents ( )
pure virtual

What happened near us since the last time, oldest first, which it hands over, as each event comes once.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ TakeInvite()

virtual std::optional< protocol::GuildInvite > nanommo::Link::TakeInvite ( )
pure virtual

The guild that asked us to join since the last time, once.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ trade()

virtual const protocol::Trade & nanommo::Link::trade ( ) const
pure virtual

Our trade, with nobody in it for none.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ whole()

virtual int64_t nanommo::Link::whole ( ) const
pure virtual

The newest world that's come whole, by when it was sent, for the server to leave out what hasn't changed since.

Implemented in nanommo::Connection, nanommo::LocalConnection, and nanommo::WebSocketLink.

◆ world()

virtual const protocol::World & nanommo::Link::world ( ) const
pure virtual

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