wavelength 1.0.0
Loading...
Searching...
No Matches
nettransport.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "app/msgsink.h"
6#include "game/netgamescore.h"
8
17public:
25 virtual void SetSink(MsgSink *pSink) = 0;
26
34 virtual void Send(ExternalPacket &packet) = 0;
35
41 virtual bool IsHost() = 0;
42
44 virtual void Leave() = 0;
45
51 virtual void ReportScores(const std::vector<NetGameScore> &scores) = 0;
52
59 virtual ~NetTransport() {
60 }
61};
62
Base of a packet a peer sends to another console.
Definition externalpacket.h:11
Receiver of engine messages.
Definition msgsink.h:21
Connection that carries packets between consoles.
Definition nettransport.h:16
virtual void Send(ExternalPacket &packet)=0
Encode a packet and send it to the peers its receiver selects.
virtual void SetSink(MsgSink *pSink)=0
Set the sink the received messages go to.
virtual bool IsHost()=0
Report whether this console hosts the session.
virtual void ReportScores(const std::vector< NetGameScore > &scores)=0
Report the final scores of the session to the session server.
virtual ~NetTransport()
Release the transport.
Definition nettransport.h:59
virtual void Leave()=0
Leave the session.
NetTransport * TheNetTransport
The network transport.