mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 05:08:57 +00:00
Deduplicate NetPlayServer::Send() and NetPlayClient::Send() into ENetUtil::SendPacket().
This commit is contained in:
parent
5f3e8e0f05
commit
66684a392f
4 changed files with 14 additions and 6 deletions
|
@ -35,4 +35,11 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SendPacket(ENetPeer* socket, const sf::Packet& packet, u8 channel_id)
|
||||
{
|
||||
ENetPacket* epac =
|
||||
enet_packet_create(packet.getData(), packet.getDataSize(), ENET_PACKET_FLAG_RELIABLE);
|
||||
enet_peer_send(socket, channel_id, epac);
|
||||
}
|
||||
} // namespace ENetUtil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue