projects
/
vg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bad char
[vg.git]
/
vg_steam_networking.h
diff --git
a/vg_steam_networking.h
b/vg_steam_networking.h
index a2745758d5b8b18340c08add692a8a4d2d38f042..5abb7b651afed22dbe9f38437ff1438e0617282d 100644
(file)
--- a/
vg_steam_networking.h
+++ b/
vg_steam_networking.h
@@
-1,6
+1,4
@@
-#ifndef VG_STEAM_NETWORKING_H
-#define VG_STEAM_NETWORKING_H
-
+#pragma once
#include "vg_steam.h"
#ifdef VALVE_CALLBACK_PACK_SMALL
#include "vg_steam.h"
#ifdef VALVE_CALLBACK_PACK_SMALL
@@
-183,7
+181,7
@@
typedef enum ESteamNetworkingAvailability ESteamNetworkingAvailability;
/* Handle used to identify a connection to a remote host. */
typedef u32 HSteamNetConnection;
/* Handle used to identify a connection to a remote host. */
typedef u32 HSteamNetConnection;
-HSteamNetConnection const k_HSteamNetConnection_Invalid = 0;
+
static
HSteamNetConnection const k_HSteamNetConnection_Invalid = 0;
/*
* Handle used to identify a "listen socket". Unlike traditional
/*
* Handle used to identify a "listen socket". Unlike traditional
@@
-191,7
+189,7
@@
HSteamNetConnection const k_HSteamNetConnection_Invalid = 0;
* different abstractions.
*/
typedef u32 HSteamListenSocket;
* different abstractions.
*/
typedef u32 HSteamListenSocket;
-HSteamListenSocket const k_HSteamListenSocket_Invalid = 0;
+
static
HSteamListenSocket const k_HSteamListenSocket_Invalid = 0;
typedef u32 SteamNetworkingPOPID;
typedef i64 SteamNetworkingMicroseconds;
typedef u32 SteamNetworkingPOPID;
typedef i64 SteamNetworkingMicroseconds;
@@
-393,12
+391,12
@@
typedef struct SteamNetConnectionInfo_t SteamNetConnectionInfo_t;
* connections at once efficiently.
*/
typedef u32 HSteamNetPollGroup;
* connections at once efficiently.
*/
typedef u32 HSteamNetPollGroup;
-HSteamNetPollGroup const k_HSteamNetPollGroup_Invalid = 0;
+
static
HSteamNetPollGroup const k_HSteamNetPollGroup_Invalid = 0;
ISteamNetworkingSockets
*SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012(void);
ISteamNetworkingSockets
*SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012(void);
-ISteamNetworkingSockets
+
static inline
ISteamNetworkingSockets
*SteamAPI_SteamGameServerNetworkingSockets_SteamAPI(void)
{
return SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012();
*SteamAPI_SteamGameServerNetworkingSockets_SteamAPI(void)
{
return SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012();
@@
-406,6
+404,7
@@
ISteamNetworkingSockets
ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v012();
ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v012();
+static inline
ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI()
{
return SteamAPI_SteamNetworkingSockets_SteamAPI_v012();
ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI()
{
return SteamAPI_SteamNetworkingSockets_SteamAPI_v012();
@@
-425,7
+424,7
@@
ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI()
* Migration note: This is not exactly the same as k_EP2PSendUnreliable! You
* probably want k_ESteamNetworkingSendType_UnreliableNoNagle
*/
* Migration note: This is not exactly the same as k_EP2PSendUnreliable! You
* probably want k_ESteamNetworkingSendType_UnreliableNoNagle
*/
-const int k_nSteamNetworkingSend_Unreliable = 0;
+
static
const int k_nSteamNetworkingSend_Unreliable = 0;
/*
* Disable Nagle's algorithm.
/*
* Disable Nagle's algorithm.
@@
-446,7
+445,7
@@
const int k_nSteamNetworkingSend_Unreliable = 0;
* server simulation tick to a particular client), and you use this flag to
* flush all messages.
*/
* server simulation tick to a particular client), and you use this flag to
* flush all messages.
*/
-const int k_nSteamNetworkingSend_NoNagle = 1;
+
static
const int k_nSteamNetworkingSend_NoNagle = 1;
/*
* Send a message unreliably, bypassing Nagle's algorithm for this message and
/*
* Send a message unreliably, bypassing Nagle's algorithm for this message and
@@
-456,7
+455,7
@@
const int k_nSteamNetworkingSend_NoNagle = 1;
* ISteamNetworkingMessages::FlushMessagesToUser. (But using this flag is more
* efficient since you only make one API call.)
*/
* ISteamNetworkingMessages::FlushMessagesToUser. (But using this flag is more
* efficient since you only make one API call.)
*/
-const int k_nSteamNetworkingSend_UnreliableNoNagle =
+
static
const int k_nSteamNetworkingSend_UnreliableNoNagle =
k_nSteamNetworkingSend_Unreliable |
k_nSteamNetworkingSend_NoNagle;
/*
k_nSteamNetworkingSend_Unreliable |
k_nSteamNetworkingSend_NoNagle;
/*
@@
-465,7
+464,7
@@
const int k_nSteamNetworkingSend_UnreliableNoNagle =
* This is only applicable for unreliable messages. Using this flag on reliable
* messages is invalid.
*/
* This is only applicable for unreliable messages. Using this flag on reliable
* messages is invalid.
*/
-const int k_nSteamNetworkingSend_NoDelay = 4;
+
static
const int k_nSteamNetworkingSend_NoDelay = 4;
/*
* Send an unreliable message, but if it cannot be sent relatively quickly, just
/*
* Send an unreliable message, but if it cannot be sent relatively quickly, just
@@
-483,7
+482,7
@@
const int k_nSteamNetworkingSend_NoDelay = 4;
*
* If a message is dropped for these reasons, k_EResultIgnored will be returned.
*/
*
* If a message is dropped for these reasons, k_EResultIgnored will be returned.
*/
-const int k_nSteamNetworkingSend_UnreliableNoDelay =
+
static
const int k_nSteamNetworkingSend_UnreliableNoDelay =
k_nSteamNetworkingSend_Unreliable |
k_nSteamNetworkingSend_NoDelay |
k_nSteamNetworkingSend_NoNagle;
k_nSteamNetworkingSend_Unreliable |
k_nSteamNetworkingSend_NoDelay |
k_nSteamNetworkingSend_NoNagle;
@@
-502,14
+501,14
@@
const int k_nSteamNetworkingSend_UnreliableNoDelay =
* Migration note: This is NOT the same as k_EP2PSendReliable, it's more like
* k_EP2PSendReliableWithBuffering
*/
* Migration note: This is NOT the same as k_EP2PSendReliable, it's more like
* k_EP2PSendReliableWithBuffering
*/
-const int k_nSteamNetworkingSend_Reliable = 8;
+
static
const int k_nSteamNetworkingSend_Reliable = 8;
/*
* Send a message reliably, but bypass Nagle's algorithm.
*
* Migration note: This is equivalent to k_EP2PSendReliable
*/
/*
* Send a message reliably, but bypass Nagle's algorithm.
*
* Migration note: This is equivalent to k_EP2PSendReliable
*/
-const int k_nSteamNetworkingSend_ReliableNoNagle =
+
static
const int k_nSteamNetworkingSend_ReliableNoNagle =
k_nSteamNetworkingSend_Reliable |
k_nSteamNetworkingSend_NoNagle;
k_nSteamNetworkingSend_Reliable |
k_nSteamNetworkingSend_NoNagle;
@@
-933,12
+932,14
@@
void SteamAPI_SteamNetworkingMessage_t_Release(SteamNetworkingMessage_t* self);
* Utility
*/
* Utility
*/
-static const char *string_ESteamNetworkingConnectionState(
+static
inline
const char *string_ESteamNetworkingConnectionState(
ESteamNetworkingConnectionState s )
{
switch(s)
{
ESteamNetworkingConnectionState s )
{
switch(s)
{
- case k_ESteamNetworkingConnectionState_None: return "None"; break;
+ case k_ESteamNetworkingConnectionState_None:
+ return "None";
+ break;
case k_ESteamNetworkingConnectionState_Connecting:
return "Connecting";
break;
case k_ESteamNetworkingConnectionState_Connecting:
return "Connecting";
break;
@@
-971,7
+972,7
@@
static const char *string_ESteamNetworkingConnectionState(
return "Error";
}
return "Error";
}
-static const char *string_ESteamNetworkingAvailability(
+static
inline
const char *string_ESteamNetworkingAvailability(
ESteamNetworkingAvailability s )
{
switch(s)
ESteamNetworkingAvailability s )
{
switch(s)
@@
-1008,5
+1009,3
@@
static const char *string_ESteamNetworkingAvailability(
break;
}
}
break;
}
}
-
-#endif /* VG_STEAM_NETWORKING_H */