SuperTuxKart
Loading...
Searching...
No Matches
Classes | Enumerations
event.hpp File Reference

Contains an interface to store network events, like connections, disconnections and messages. More...

#include "network/network_string.hpp"
#include "utils/leak_check.hpp"
#include "utils/types.hpp"
#include "enet/enet.h"
#include <memory>
Include dependency graph for event.hpp:

Go to the source code of this file.

Classes

class  Event
 Class representing an event that need to pass trough the system. This is used to remove ENet dependency in the network. It interfaces the ENetEvent structure. The user has to be extremely careful about the peer. Indeed, when packets are logged, the state of the peer cannot be stored at all times, and then the user of this class can rely only on the address/port of the peer, and not on values that might change over time. More...
 

Enumerations

enum  EVENT_TYPE { EVENT_TYPE_CONNECTED , EVENT_TYPE_DISCONNECTED , EVENT_TYPE_MESSAGE }
 Represents a network event type. More...
 
enum  EVENT_CHANNEL : uint8_t { EVENT_CHANNEL_NORMAL = 0 , EVENT_CHANNEL_UNENCRYPTED = 1 , EVENT_CHANNEL_DATA_TRANSFER = 2 , EVENT_CHANNEL_COUNT = 3 }
 Represents a list of channels stk used. More...
 

Detailed Description

Contains an interface to store network events, like connections, disconnections and messages.

Enumeration Type Documentation

◆ EVENT_CHANNEL

enum EVENT_CHANNEL : uint8_t

Represents a list of channels stk used.

Enumerator
EVENT_CHANNEL_NORMAL 

Normal channel (encrypted if supported)

EVENT_CHANNEL_UNENCRYPTED 

Unencrypted channel.

EVENT_CHANNEL_DATA_TRANSFER 

Data transfer channel (like game replay)

◆ EVENT_TYPE

enum EVENT_TYPE

Represents a network event type.

Enumerator
EVENT_TYPE_CONNECTED 

A peer is connected.

EVENT_TYPE_DISCONNECTED 

A peer is disconnected.

EVENT_TYPE_MESSAGE 

A message between server and client protocols.