Network/ENetHost: Move handling to ENetPeer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Network module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
@@ -68,19 +68,8 @@ namespace Nz
|
||||
|
||||
bool DispatchIncomingCommands(ENetEvent* event);
|
||||
|
||||
bool HandleAcknowledge(ENetEvent* event, ENetPeer* peer, const ENetProtocol* command);
|
||||
bool HandleBandwidthLimit(ENetPeer* peer, const ENetProtocol* command);
|
||||
ENetPeer* HandleConnect(ENetProtocolHeader* header, ENetProtocol* command);
|
||||
bool HandleDisconnect(ENetPeer* peer, const ENetProtocol* command);
|
||||
bool HandleIncomingCommands(ENetEvent* event);
|
||||
bool HandlePing(ENetPeer* peer, const ENetProtocol* command);
|
||||
bool HandleSendFragment(ENetPeer* peer, const ENetProtocol* command, UInt8** currentData);
|
||||
bool HandleSendReliable(ENetPeer* peer, const ENetProtocol* command, UInt8** currentData);
|
||||
bool HandleSendUnreliable(ENetPeer* peer, const ENetProtocol* command, UInt8** currentData);
|
||||
bool HandleSendUnreliableFragment(ENetPeer* peer, const ENetProtocol* command, UInt8** currentData);
|
||||
bool HandleSendUnsequenced(ENetPeer* peer, const ENetProtocol* command, UInt8** currentData);
|
||||
bool HandleThrottleConfigure(ENetPeer* peer, const ENetProtocol* command);
|
||||
bool HandleVerifyConnect(ENetEvent* event, ENetPeer* peer, ENetProtocol* command);
|
||||
|
||||
int ReceiveIncomingCommands(ENetEvent* event);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// Copyright (C) 2017 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Network module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <Nazara/Core/Clock.hpp>
|
||||
#include <Nazara/Core/MemoryPool.hpp>
|
||||
#include <Nazara/Network/ENetPacket.hpp>
|
||||
#include <Nazara/Network/ENetPeer.hpp>
|
||||
#include <Nazara/Network/ENetProtocol.hpp>
|
||||
#include <Nazara/Network/IpAddress.hpp>
|
||||
#include <Nazara/Network/NetPacket.hpp>
|
||||
@@ -77,6 +78,18 @@ namespace Nz
|
||||
void DispatchIncomingReliableCommands(Channel& channel);
|
||||
void DispatchIncomingUnreliableCommands(Channel& channel);
|
||||
|
||||
bool HandleAcknowledge(const ENetProtocol* command, ENetEvent* event);
|
||||
bool HandleBandwidthLimit(const ENetProtocol* command);
|
||||
bool HandleDisconnect(const ENetProtocol* command);
|
||||
bool HandlePing(const ENetProtocol* command);
|
||||
bool HandleSendFragment(const ENetProtocol* command, UInt8** data);
|
||||
bool HandleSendReliable(const ENetProtocol* command, UInt8** data);
|
||||
bool HandleSendUnreliable(const ENetProtocol* command, UInt8** data);
|
||||
bool HandleSendUnreliableFragment(const ENetProtocol* command, UInt8** data);
|
||||
bool HandleSendUnsequenced(const ENetProtocol* command, UInt8** data);
|
||||
bool HandleThrottleConfigure(const ENetProtocol* command);
|
||||
bool HandleVerifyConnect(const ENetProtocol* command, ENetEvent* event);
|
||||
|
||||
void OnConnect();
|
||||
void OnDisconnect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user