mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Custom broadcasts file is more appropriate in:
Goldberg SteamEmu Saves/settings/custom_broadcasts.txt Use C++ vector instead of C arrays.
This commit is contained in:
parent
3552eed3ec
commit
701eba17e8
7 changed files with 32 additions and 29 deletions
|
|
@ -20,8 +20,6 @@
|
|||
#ifndef NETWORK_INCLUDE
|
||||
#define NETWORK_INCLUDE
|
||||
|
||||
#define MAX_CUSTOM_BROADCASTS 128
|
||||
|
||||
#include "net.pb.h"
|
||||
#include <chrono>
|
||||
|
||||
|
|
@ -108,7 +106,7 @@ class Networking {
|
|||
std::vector<CSteamID> ids;
|
||||
uint32 appid;
|
||||
std::chrono::high_resolution_clock::time_point last_broadcast;
|
||||
uint32_t custom_broadcasts[MAX_CUSTOM_BROADCASTS];
|
||||
std::vector<uint32_t> custom_broadcasts;
|
||||
|
||||
std::vector<struct TCP_Socket> accepted;
|
||||
std::recursive_mutex mutex;
|
||||
|
|
@ -123,7 +121,7 @@ class Networking {
|
|||
|
||||
Common_Message create_announce(bool request);
|
||||
public:
|
||||
Networking(CSteamID id, uint32 appid, uint16 port, uint32_t *custom_broadcasts);
|
||||
Networking(CSteamID id, uint32 appid, uint16 port, std::vector<uint32_t> *custom_broadcasts);
|
||||
void addListenId(CSteamID id);
|
||||
void setAppID(uint32 appid);
|
||||
void Run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue