FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
fge::net::NetFluxUdp Class Reference

A network flux. More...

#include <C_server.hpp>

Inheritance diagram for fge::net::NetFluxUdp:
fge::net::ClientSideNetUdp fge::net::ServerNetFluxUdp

Public Member Functions

 NetFluxUdp (NetFluxUdp const &r)=delete
 
 NetFluxUdp (NetFluxUdp &&r) noexcept=delete
 
NetFluxUdpoperator= (NetFluxUdp const &r)=delete
 
NetFluxUdpoperator= (NetFluxUdp &&r) noexcept=delete
 
void clearPackets ()
 
FluxPacketPtr popNextPacket ()
 
std::size_t getPacketsSize () const
 
bool isEmpty () const
 
void setMaxPackets (std::size_t n)
 
std::size_t getMaxPackets () const
 

Protected Member Functions

bool pushPacket (FluxPacketPtr &&fluxPck)
 
void forcePushPacket (FluxPacketPtr fluxPck)
 
void forcePushPacketFront (FluxPacketPtr fluxPck)
 
FluxProcessResults processReorder (Client &client, FluxPacketPtr &refFluxPacket, ProtocolPacket::CountId currentCountId, bool ignoreRealm)
 

Protected Attributes

std::mutex _g_mutexFlux
 
std::deque< FluxPacketPtr > _g_packets
 
std::size_t _g_remainingPackets {0}
 

Friends

class ServerSideNetUdp
 

Detailed Description

A network flux.

Every flux have its own client list and packet queue.

When a packet is received by the network, it is pushed into the flux only if FGE_SERVER_DEFAULT_MAXPACKET is not reached. If it is, the packet is transmitted to another flux or dismissed if no one is available.


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