mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
NetPlay: Implement chunked data transfer
This sends arbitrary packets in chunks to be reassembled at the other end, allowing large data transfers to be speed-limited and interleaved with other packets being sent. It also enables tracking the progress of large data transfers.
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Random.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
|
||||
TraversalClient::TraversalClient(ENetHost* netHost, const std::string& server, const u16 port)
|
||||
: m_NetHost(netHost), m_Server(server), m_port(port)
|
||||
@ -316,11 +317,11 @@ bool EnsureTraversalClient(const std::string& server, u16 server_port, u16 liste
|
||||
g_OldListenPort = listen_port;
|
||||
|
||||
ENetAddress addr = {ENET_HOST_ANY, listen_port};
|
||||
ENetHost* host = enet_host_create(&addr, // address
|
||||
50, // peerCount
|
||||
1, // channelLimit
|
||||
0, // incomingBandwidth
|
||||
0); // outgoingBandwidth
|
||||
ENetHost* host = enet_host_create(&addr, // address
|
||||
50, // peerCount
|
||||
NetPlay::CHANNEL_COUNT, // channelLimit
|
||||
0, // incomingBandwidth
|
||||
0); // outgoingBandwidth
|
||||
if (!host)
|
||||
{
|
||||
g_MainNetHost.reset();
|
||||
|
Reference in New Issue
Block a user