Debian Codegraph @

Source/Core/Common/ENet.h

raw symbols SCIP
1 // Copyright 2015 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 //
4 #pragma once
5
6 #include <memory>
7
8 #include <SFML/Network/Packet.hpp>
9 #include <enet/enet.h>
10
11 #include "Common/CommonTypes.h"
12
13 namespace Common::ENet
14 {
15 struct ENetHostDeleter
16 {
17 void operator()(ENetHost* host) const noexcept { enet_host_destroy(host); }
18 };
19 using ENetHostPtr = std::unique_ptr<ENetHost, ENetHostDeleter>;
20
21 void WakeupThread(ENetHost* host);
22 int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event);
23 bool SendPacket(ENetPeer* socket, const sf::Packet& packet, u8 channel_id);
24
25 // used for traversal packets and wake-up packets
26 constexpr int SKIPPABLE_EVENT = 42;
27 } // namespace Common::ENet