![]() |
FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
|
A network flux. More...
#include <C_server.hpp>
Public Member Functions | |
NetFluxUdp (NetFluxUdp const &r)=delete | |
NetFluxUdp (NetFluxUdp &&r) noexcept=delete | |
NetFluxUdp & | operator= (NetFluxUdp const &r)=delete |
NetFluxUdp & | operator= (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 |
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.