FastEngine 0.9.5
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 (bool defaultFlux)
 NetFluxUdp (NetFluxUdp const &r)=delete
 NetFluxUdp (NetFluxUdp &&r) noexcept=delete
NetFluxUdp & operator= (NetFluxUdp const &r)=delete
NetFluxUdp & operator= (NetFluxUdp &&r) noexcept=delete
void clearPackets ()
ReceivedPacketPtr popNextPacket ()
std::size_t getPacketsSize () const
bool isEmpty () const
void setMaxPackets (std::size_t n)
std::size_t getMaxPackets () const
bool isDefaultFlux () const

Protected Member Functions

bool pushPacket (ReceivedPacketPtr &&fluxPck)
void forcePushPacket (ReceivedPacketPtr fluxPck)
void forcePushPacketFront (ReceivedPacketPtr fluxPck)

Protected Attributes

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

Friends

class ServerSideNetUdp
class PacketReorderer

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: