eolib-cpp 0.1.0-beta.7
Core C++ library for writing Endless Online applications
Loading...
Searching...
No Matches
eolib::protocol::net::server::InitInitServerPacket Class Referencefinal

Reply to connection initialization and requests for unencrypted data. This packet is unencrypted. More...

#include <eolib/protocol/net/server/packets.hpp>

Inherits eolib::protocol::net::Packet.

Classes

class  ReplyCodeDataOutOfDate
 Data associated with reply_code value OutOfDate. More...
class  ReplyCodeDataOk
 Data associated with reply_code value Ok. More...
class  ReplyCodeDataBanned
 Data associated with reply_code value Banned. More...
class  ReplyCodeDataWarpMap
 Data associated with reply_code value WarpMap. More...
class  ReplyCodeDataFileEmf
 Data associated with reply_code value FileEmf. More...
class  ReplyCodeDataFileEif
 Data associated with reply_code value FileEif. More...
class  ReplyCodeDataFileEnf
 Data associated with reply_code value FileEnf. More...
class  ReplyCodeDataFileEsf
 Data associated with reply_code value FileEsf. More...
class  ReplyCodeDataFileEcf
 Data associated with reply_code value FileEcf. More...
class  ReplyCodeDataMapMutation
 Data associated with reply_code value MapMutation. More...
class  ReplyCodeDataPlayersList
 Data associated with reply_code value PlayersList. More...
class  ReplyCodeDataPlayersListFriends
 Data associated with reply_code value PlayersListFriends. More...

Public Types

using ReplyCodeData = std::variant<std::monostate, ReplyCodeDataOutOfDate, ReplyCodeDataOk, ReplyCodeDataBanned, ReplyCodeDataWarpMap, ReplyCodeDataFileEmf, ReplyCodeDataFileEif, ReplyCodeDataFileEnf, ReplyCodeDataFileEsf, ReplyCodeDataFileEcf, ReplyCodeDataMapMutation, ReplyCodeDataPlayersList, ReplyCodeDataPlayersListFriends>
 Data associated with different values of the reply_code field.

Public Member Functions

const ReplyCodeDataOutOfDate * AsOutOfDate () const noexcept
 Gets the data associated with reply_code value OutOfDate.
ReplyCodeDataOutOfDate * AsOutOfDate () noexcept
 Gets the data associated with reply_code value OutOfDate.
const ReplyCodeDataOk * AsOk () const noexcept
 Gets the data associated with reply_code value Ok.
ReplyCodeDataOk * AsOk () noexcept
 Gets the data associated with reply_code value Ok.
const ReplyCodeDataBanned * AsBanned () const noexcept
 Gets the data associated with reply_code value Banned.
ReplyCodeDataBanned * AsBanned () noexcept
 Gets the data associated with reply_code value Banned.
const ReplyCodeDataWarpMap * AsWarpMap () const noexcept
 Gets the data associated with reply_code value WarpMap.
ReplyCodeDataWarpMap * AsWarpMap () noexcept
 Gets the data associated with reply_code value WarpMap.
const ReplyCodeDataFileEmf * AsFileEmf () const noexcept
 Gets the data associated with reply_code value FileEmf.
ReplyCodeDataFileEmf * AsFileEmf () noexcept
 Gets the data associated with reply_code value FileEmf.
const ReplyCodeDataFileEif * AsFileEif () const noexcept
 Gets the data associated with reply_code value FileEif.
ReplyCodeDataFileEif * AsFileEif () noexcept
 Gets the data associated with reply_code value FileEif.
const ReplyCodeDataFileEnf * AsFileEnf () const noexcept
 Gets the data associated with reply_code value FileEnf.
ReplyCodeDataFileEnf * AsFileEnf () noexcept
 Gets the data associated with reply_code value FileEnf.
const ReplyCodeDataFileEsf * AsFileEsf () const noexcept
 Gets the data associated with reply_code value FileEsf.
ReplyCodeDataFileEsf * AsFileEsf () noexcept
 Gets the data associated with reply_code value FileEsf.
const ReplyCodeDataFileEcf * AsFileEcf () const noexcept
 Gets the data associated with reply_code value FileEcf.
ReplyCodeDataFileEcf * AsFileEcf () noexcept
 Gets the data associated with reply_code value FileEcf.
const ReplyCodeDataMapMutation * AsMapMutation () const noexcept
 Gets the data associated with reply_code value MapMutation.
ReplyCodeDataMapMutation * AsMapMutation () noexcept
 Gets the data associated with reply_code value MapMutation.
const ReplyCodeDataPlayersList * AsPlayersList () const noexcept
 Gets the data associated with reply_code value PlayersList.
ReplyCodeDataPlayersList * AsPlayersList () noexcept
 Gets the data associated with reply_code value PlayersList.
const ReplyCodeDataPlayersListFriends * AsPlayersListFriends () const noexcept
 Gets the data associated with reply_code value PlayersListFriends.
ReplyCodeDataPlayersListFriends * AsPlayersListFriends () noexcept
 Gets the data associated with reply_code value PlayersListFriends.
PacketFamily Family () const noexcept override
 Gets the packet family associated with this packet.
PacketAction Action () const noexcept override
 Gets the packet action associated with this packet.
int ByteSize () const noexcept override
 Gets the size of the data that this object was deserialized from.
void Serialize (data::EoWriter &writer) const override
 Serializes this object to the provided writer.
void Deserialize (data::EoReader &reader) override
 Deserializes this object from the provided reader, replacing its current data.
std::string ToString () const override
 Gets a human-readable representation of this object, for debugging purposes.
bool operator== (const InitInitServerPacket &other) const
 Compares this object with another for equality.
bool operator!= (const InitInitServerPacket &other) const
 Compares this object with another for inequality.
Public Member Functions inherited from eolib::protocol::Serializable
virtual ~Serializable ()=default

Static Public Member Functions

static InitInitServerPacket ForOutOfDate (ReplyCodeDataOutOfDate data)
 Creates a new InitInitServerPacket with reply_code set to OutOfDate.
static InitInitServerPacket ForOk (ReplyCodeDataOk data)
 Creates a new InitInitServerPacket with reply_code set to Ok.
static InitInitServerPacket ForBannedTemporary (ReplyCodeDataBanned::BanTypeDataTemporary data)
 Creates a new InitInitServerPacket with reply_code set to Banned and ban_type set to Temporary.
static InitInitServerPacket ForBannedPermanent ()
 Creates a new InitInitServerPacket with reply_code set to Banned and ban_type set to Permanent.
static InitInitServerPacket ForBanTypeData0 (ReplyCodeDataBanned::BanTypeData0 data)
 Creates a new InitInitServerPacket with reply_code set to Banned and ban_type set to 0.
static InitInitServerPacket ForWarpMap (ReplyCodeDataWarpMap data)
 Creates a new InitInitServerPacket with reply_code set to WarpMap.
static InitInitServerPacket ForFileEmf (ReplyCodeDataFileEmf data)
 Creates a new InitInitServerPacket with reply_code set to FileEmf.
static InitInitServerPacket ForFileEif (ReplyCodeDataFileEif data)
 Creates a new InitInitServerPacket with reply_code set to FileEif.
static InitInitServerPacket ForFileEnf (ReplyCodeDataFileEnf data)
 Creates a new InitInitServerPacket with reply_code set to FileEnf.
static InitInitServerPacket ForFileEsf (ReplyCodeDataFileEsf data)
 Creates a new InitInitServerPacket with reply_code set to FileEsf.
static InitInitServerPacket ForPlayersList (ReplyCodeDataPlayersList data)
 Creates a new InitInitServerPacket with reply_code set to PlayersList.
static InitInitServerPacket ForMapMutation (ReplyCodeDataMapMutation data)
 Creates a new InitInitServerPacket with reply_code set to MapMutation.
static InitInitServerPacket ForPlayersListFriends (ReplyCodeDataPlayersListFriends data)
 Creates a new InitInitServerPacket with reply_code set to PlayersListFriends.
static InitInitServerPacket ForFileEcf (ReplyCodeDataFileEcf data)
 Creates a new InitInitServerPacket with reply_code set to FileEcf.

Public Attributes

InitReply reply_code {}
ReplyCodeData reply_code_data {}
 Data associated with the reply_code field.

Static Public Attributes

static constexpr PacketFamily FAMILY = PacketFamily::Init
 The packet family associated with this packet.
static constexpr PacketAction ACTION = PacketAction::Init
 The packet action associated with this packet.

Additional Inherited Members

Protected Member Functions inherited from eolib::protocol::Serializable
 Serializable ()=default
 Serializable (const Serializable &)=default
 Serializable (Serializable &&)=default
Serializable & operator= (const Serializable &)=default
Serializable & operator= (Serializable &&)=default

Detailed Description

Reply to connection initialization and requests for unencrypted data. This packet is unencrypted.

Member Typedef Documentation

◆ ReplyCodeData

Member Function Documentation

◆ AsOutOfDate() [1/2]

const ReplyCodeDataOutOfDate * eolib::protocol::net::server::InitInitServerPacket::AsOutOfDate ( ) const
inlinenoexcept

Gets the data associated with reply_code value OutOfDate.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsOutOfDate() [2/2]

ReplyCodeDataOutOfDate * eolib::protocol::net::server::InitInitServerPacket::AsOutOfDate ( )
inlinenoexcept

Gets the data associated with reply_code value OutOfDate.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsOk() [1/2]

const ReplyCodeDataOk * eolib::protocol::net::server::InitInitServerPacket::AsOk ( ) const
inlinenoexcept

Gets the data associated with reply_code value Ok.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsOk() [2/2]

ReplyCodeDataOk * eolib::protocol::net::server::InitInitServerPacket::AsOk ( )
inlinenoexcept

Gets the data associated with reply_code value Ok.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsBanned() [1/2]

const ReplyCodeDataBanned * eolib::protocol::net::server::InitInitServerPacket::AsBanned ( ) const
inlinenoexcept

Gets the data associated with reply_code value Banned.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsBanned() [2/2]

ReplyCodeDataBanned * eolib::protocol::net::server::InitInitServerPacket::AsBanned ( )
inlinenoexcept

Gets the data associated with reply_code value Banned.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsWarpMap() [1/2]

const ReplyCodeDataWarpMap * eolib::protocol::net::server::InitInitServerPacket::AsWarpMap ( ) const
inlinenoexcept

Gets the data associated with reply_code value WarpMap.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsWarpMap() [2/2]

ReplyCodeDataWarpMap * eolib::protocol::net::server::InitInitServerPacket::AsWarpMap ( )
inlinenoexcept

Gets the data associated with reply_code value WarpMap.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEmf() [1/2]

const ReplyCodeDataFileEmf * eolib::protocol::net::server::InitInitServerPacket::AsFileEmf ( ) const
inlinenoexcept

Gets the data associated with reply_code value FileEmf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEmf() [2/2]

ReplyCodeDataFileEmf * eolib::protocol::net::server::InitInitServerPacket::AsFileEmf ( )
inlinenoexcept

Gets the data associated with reply_code value FileEmf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEif() [1/2]

const ReplyCodeDataFileEif * eolib::protocol::net::server::InitInitServerPacket::AsFileEif ( ) const
inlinenoexcept

Gets the data associated with reply_code value FileEif.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEif() [2/2]

ReplyCodeDataFileEif * eolib::protocol::net::server::InitInitServerPacket::AsFileEif ( )
inlinenoexcept

Gets the data associated with reply_code value FileEif.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEnf() [1/2]

const ReplyCodeDataFileEnf * eolib::protocol::net::server::InitInitServerPacket::AsFileEnf ( ) const
inlinenoexcept

Gets the data associated with reply_code value FileEnf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEnf() [2/2]

ReplyCodeDataFileEnf * eolib::protocol::net::server::InitInitServerPacket::AsFileEnf ( )
inlinenoexcept

Gets the data associated with reply_code value FileEnf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEsf() [1/2]

const ReplyCodeDataFileEsf * eolib::protocol::net::server::InitInitServerPacket::AsFileEsf ( ) const
inlinenoexcept

Gets the data associated with reply_code value FileEsf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEsf() [2/2]

ReplyCodeDataFileEsf * eolib::protocol::net::server::InitInitServerPacket::AsFileEsf ( )
inlinenoexcept

Gets the data associated with reply_code value FileEsf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEcf() [1/2]

const ReplyCodeDataFileEcf * eolib::protocol::net::server::InitInitServerPacket::AsFileEcf ( ) const
inlinenoexcept

Gets the data associated with reply_code value FileEcf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsFileEcf() [2/2]

ReplyCodeDataFileEcf * eolib::protocol::net::server::InitInitServerPacket::AsFileEcf ( )
inlinenoexcept

Gets the data associated with reply_code value FileEcf.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsMapMutation() [1/2]

const ReplyCodeDataMapMutation * eolib::protocol::net::server::InitInitServerPacket::AsMapMutation ( ) const
inlinenoexcept

Gets the data associated with reply_code value MapMutation.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsMapMutation() [2/2]

ReplyCodeDataMapMutation * eolib::protocol::net::server::InitInitServerPacket::AsMapMutation ( )
inlinenoexcept

Gets the data associated with reply_code value MapMutation.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsPlayersList() [1/2]

const ReplyCodeDataPlayersList * eolib::protocol::net::server::InitInitServerPacket::AsPlayersList ( ) const
inlinenoexcept

Gets the data associated with reply_code value PlayersList.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsPlayersList() [2/2]

ReplyCodeDataPlayersList * eolib::protocol::net::server::InitInitServerPacket::AsPlayersList ( )
inlinenoexcept

Gets the data associated with reply_code value PlayersList.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsPlayersListFriends() [1/2]

const ReplyCodeDataPlayersListFriends * eolib::protocol::net::server::InitInitServerPacket::AsPlayersListFriends ( ) const
inlinenoexcept

Gets the data associated with reply_code value PlayersListFriends.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ AsPlayersListFriends() [2/2]

ReplyCodeDataPlayersListFriends * eolib::protocol::net::server::InitInitServerPacket::AsPlayersListFriends ( )
inlinenoexcept

Gets the data associated with reply_code value PlayersListFriends.

Returns
the data, or nullptr if reply_code_data holds the data for a different value.

◆ ForOutOfDate()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForOutOfDate ( ReplyCodeDataOutOfDate data)
static

Creates a new InitInitServerPacket with reply_code set to OutOfDate.

Parameters
datathe data associated with reply_code OutOfDate.
Returns
the created object.

◆ ForOk()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForOk ( ReplyCodeDataOk data)
static

Creates a new InitInitServerPacket with reply_code set to Ok.

Parameters
datathe data associated with reply_code Ok.
Returns
the created object.

◆ ForBannedTemporary()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForBannedTemporary ( ReplyCodeDataBanned::BanTypeDataTemporary data)
static

Creates a new InitInitServerPacket with reply_code set to Banned and ban_type set to Temporary.

Parameters
datathe data associated with ban_type Temporary.
Returns
the created object.

◆ ForBannedPermanent()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForBannedPermanent ( )
static

Creates a new InitInitServerPacket with reply_code set to Banned and ban_type set to Permanent.

Returns
the created object.

◆ ForBanTypeData0()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForBanTypeData0 ( ReplyCodeDataBanned::BanTypeData0 data)
static

Creates a new InitInitServerPacket with reply_code set to Banned and ban_type set to 0.

Parameters
datathe data associated with ban_type 0.
Returns
the created object.

◆ ForWarpMap()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForWarpMap ( ReplyCodeDataWarpMap data)
static

Creates a new InitInitServerPacket with reply_code set to WarpMap.

Parameters
datathe data associated with reply_code WarpMap.
Returns
the created object.

◆ ForFileEmf()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForFileEmf ( ReplyCodeDataFileEmf data)
static

Creates a new InitInitServerPacket with reply_code set to FileEmf.

Parameters
datathe data associated with reply_code FileEmf.
Returns
the created object.

◆ ForFileEif()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForFileEif ( ReplyCodeDataFileEif data)
static

Creates a new InitInitServerPacket with reply_code set to FileEif.

Parameters
datathe data associated with reply_code FileEif.
Returns
the created object.

◆ ForFileEnf()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForFileEnf ( ReplyCodeDataFileEnf data)
static

Creates a new InitInitServerPacket with reply_code set to FileEnf.

Parameters
datathe data associated with reply_code FileEnf.
Returns
the created object.

◆ ForFileEsf()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForFileEsf ( ReplyCodeDataFileEsf data)
static

Creates a new InitInitServerPacket with reply_code set to FileEsf.

Parameters
datathe data associated with reply_code FileEsf.
Returns
the created object.

◆ ForPlayersList()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForPlayersList ( ReplyCodeDataPlayersList data)
static

Creates a new InitInitServerPacket with reply_code set to PlayersList.

Parameters
datathe data associated with reply_code PlayersList.
Returns
the created object.

◆ ForMapMutation()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForMapMutation ( ReplyCodeDataMapMutation data)
static

Creates a new InitInitServerPacket with reply_code set to MapMutation.

Parameters
datathe data associated with reply_code MapMutation.
Returns
the created object.

◆ ForPlayersListFriends()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForPlayersListFriends ( ReplyCodeDataPlayersListFriends data)
static

Creates a new InitInitServerPacket with reply_code set to PlayersListFriends.

Parameters
datathe data associated with reply_code PlayersListFriends.
Returns
the created object.

◆ ForFileEcf()

InitInitServerPacket eolib::protocol::net::server::InitInitServerPacket::ForFileEcf ( ReplyCodeDataFileEcf data)
static

Creates a new InitInitServerPacket with reply_code set to FileEcf.

Parameters
datathe data associated with reply_code FileEcf.
Returns
the created object.

◆ Family()

PacketFamily eolib::protocol::net::server::InitInitServerPacket::Family ( ) const
inlineoverridevirtualnoexcept

Gets the packet family associated with this packet.

Returns
the packet family.

Implements eolib::protocol::net::Packet.

◆ Action()

PacketAction eolib::protocol::net::server::InitInitServerPacket::Action ( ) const
inlineoverridevirtualnoexcept

Gets the packet action associated with this packet.

Returns
the packet action.

Implements eolib::protocol::net::Packet.

◆ ByteSize()

int eolib::protocol::net::server::InitInitServerPacket::ByteSize ( ) const
overridevirtualnoexcept

Gets the size of the data that this object was deserialized from.

Returns
the deserialized size in bytes, or 0 for an object that was not deserialized.

Implements eolib::protocol::Serializable.

◆ Serialize()

void eolib::protocol::net::server::InitInitServerPacket::Serialize ( data::EoWriter & writer) const
overridevirtual

Serializes this object to the provided writer.

Parameters
writerthe writer that the data will be written to.
Exceptions
SerializationErrorif the object's data is invalid for serialization.

Implements eolib::protocol::Serializable.

◆ Deserialize()

void eolib::protocol::net::server::InitInitServerPacket::Deserialize ( data::EoReader & reader)
overridevirtual

Deserializes this object from the provided reader, replacing its current data.

Parameters
readerthe reader that the data will be read from.

Implements eolib::protocol::Serializable.

◆ ToString()

std::string eolib::protocol::net::server::InitInitServerPacket::ToString ( ) const
overridevirtual

Gets a human-readable representation of this object, for debugging purposes.

Returns
the object's fields and values, as a string.

Implements eolib::protocol::Serializable.

◆ operator==()

bool eolib::protocol::net::server::InitInitServerPacket::operator== ( const InitInitServerPacket & other) const

Compares this object with another for equality.

The deserialized byte size is not compared.

Parameters
otherthe object to compare with.
Returns
true if all fields are equal, otherwise false.

◆ operator!=()

bool eolib::protocol::net::server::InitInitServerPacket::operator!= ( const InitInitServerPacket & other) const

Compares this object with another for inequality.

The deserialized byte size is not compared.

Parameters
otherthe object to compare with.
Returns
true if any field differs, otherwise false.

Member Data Documentation

◆ FAMILY

PacketFamily eolib::protocol::net::server::InitInitServerPacket::FAMILY = PacketFamily::Init
staticconstexpr

The packet family associated with this packet.

◆ ACTION

PacketAction eolib::protocol::net::server::InitInitServerPacket::ACTION = PacketAction::Init
staticconstexpr

The packet action associated with this packet.

◆ reply_code

InitReply eolib::protocol::net::server::InitInitServerPacket::reply_code {}

◆ reply_code_data

ReplyCodeData eolib::protocol::net::server::InitInitServerPacket::reply_code_data {}

Data associated with the reply_code field.