wavelength 1.0.0
Loading...
Searching...
No Matches
ExternalPacket Class Reference

Base of a packet a peer sends to another console. More...

#include <externalpacket.h>

Inheritance diagram for ExternalPacket:
Collaboration diagram for ExternalPacket:

Public Member Functions

 ExternalPacket (unsigned char nFlags=0, int nReceiver=kAllPeers)
 Construct a packet from an unset sender.
int Route () override
 Report that a received packet goes to the sink of TheNetTransport.
Public Member Functions inherited from Packet
void PrintExtra (PrnStream &stream) const override
 Write the sender and the receiver that are set, as from: and to:.
unsigned char GetFlags () const
int GetReceiver () const
int GetSender () const
void SetSender (int nSender)
Public Member Functions inherited from Message
virtual ~Message ()
 Vtable slot 1.
virtual Message * Clone ()=0
 Produce a heap copy of this message.
virtual int Type ()=0
 Report this message's registered identity.
virtual const char * GetName () const =0
 Report this message's class name.
virtual void saveGuts (BinStream &stream) const
 Write this message's payload to a stream.
virtual void restoreGuts (BinStream &stream)
 Read this message's payload from a stream.
virtual ~Message ()
virtual void Unused1 ()
 Not called by the control.
virtual int Type ()=0

Additional Inherited Members

Public Types inherited from Packet
enum  RouteFlag { kRouteTransport = 1 , kRouteLaunchpad = 2 }
 Bits of Route(). More...
Static Public Member Functions inherited from Message
static Message * NewMessage (int nType)
 Produce a message of the identified class through the factory list.
Static Public Attributes inherited from Packet
static constexpr int kUnset = -2
 Value of mSender and mReceiver that marks the member as unset.
static constexpr int kAllPeers = -1
 Value of mReceiver that addresses every peer.
static constexpr unsigned char kFlagOrdered = 1
 Bit of mFlags that LaunchpadRT::Send() turns into the second delivery bit of the session library.
static constexpr unsigned char kFlagGuaranteed = 2
 Bit of mFlags that NetTransport::Send() turns into its guaranteed delivery bit.
Protected Member Functions inherited from Packet
 Packet (unsigned char nFlags, int nReceiver)
 Construct a packet from an unset sender.

Detailed Description

Base of a packet a peer sends to another console.

The RTTI records Packet as the one base. The class adds no member. Every packet constructor marks the sender unset, and NetTransport::Send() reads the receiver and the delivery flags.

Constructor & Destructor Documentation

◆ ExternalPacket()

ExternalPacket::ExternalPacket ( unsigned char nFlags = 0,
int nReceiver = kAllPeers )
inlineexplicit

Construct a packet from an unset sender.

Inline. Every packet constructor expands it.

Parameters
nFlagsThe delivery flags.
nReceiverThe peer the packet is for, or kAllPeers.

Member Function Documentation

◆ Route()

int ExternalPacket::Route ( )
inlineoverridevirtual

Report that a received packet goes to the sink of TheNetTransport.

Inline. Every derived vtable addresses a shared copy that returns 1.

Returns
kRouteTransport.

Implements Packet.


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