Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
NetSend.h File Reference

Thin wrappers around ENet packet creation, queueing, and flushing. More...

#include <array>
#include <cstddef>
#include <enet/enet.h>
#include "NetCommon.h"
#include "Util/Log.h"

Go to the source code of this file.

Namespaces

namespace  bomberman::net
 Shared multiplayer protocol types and transport-facing wire helpers.
 

Functions

template<std::size_t N>
bool bomberman::net::queueOnChannel (ENetPeer *peer, EChannel channel, uint32_t flags, const std::array< uint8_t, N > &bytes)
 Queues a pre-serialized byte buffer on an explicit channel.
 
void bomberman::net::flush (ENetHost *host)
 Flushes all currently queued packets for this host.
 
template<std::size_t N>
bool bomberman::net::queueReliableControl (ENetPeer *peer, const std::array< uint8_t, N > &bytes)
 Queues a reliable control packet.
 
template<std::size_t N>
bool bomberman::net::queueReliableGame (ENetPeer *peer, const std::array< uint8_t, N > &bytes)
 Queues a reliable gameplay packet.
 
template<std::size_t N>
bool bomberman::net::queueUnreliableInput (ENetPeer *peer, const std::array< uint8_t, N > &bytes)
 Queues an unreliable input packet.
 
template<std::size_t N>
bool bomberman::net::queueUnreliableSnapshot (ENetPeer *peer, const std::array< uint8_t, N > &bytes)
 Queues an unreliable snapshot packet.
 
template<std::size_t N>
bool bomberman::net::queueUnreliableCorrection (ENetPeer *peer, const std::array< uint8_t, N > &bytes)
 Queues an unreliable owner-correction packet.
 

Detailed Description

Thin wrappers around ENet packet creation, queueing, and flushing.