mirror of
https://github.com/rlabrecque/SteamworksSDK.git
synced 2026-10-10 01:23:04 +08:00
v1.58
This commit is contained in:
+20
@@ -8,6 +8,26 @@ Copyright
|
||||
Welcome to the Steamworks SDK. For documentation please see our partner
|
||||
website at: http://partner.steamgames.com
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.58a 26th October 2023
|
||||
----------------------------------------------------------------
|
||||
Fixes to steam_api_flat.h
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.58 15th September 2023
|
||||
----------------------------------------------------------------
|
||||
ISteamRemotePlay
|
||||
* Added BStartRemotePlayTogether to start Remote Play Together and optionally show the UI in the overlay
|
||||
|
||||
ISteamUGC
|
||||
* The function SetItemTags now takes in a parameter to allow the modification of admin tags through the SDK if the logged-in user has the appropriate permissions
|
||||
* Added GetUserContentDescriptorPreferences, which can be used to show the user their current set of preferences and then direct them to Steam to modify them at https://store.steampowered.com/account/preferences/
|
||||
|
||||
Misc.
|
||||
* Added SteamAPI_InitEx and SteamGameServer_InitEx, which will return k_ESteamAPIInitResult_OK upon success or an error code specified in in ESteamAPIInitResult. An optional, non-localized error message can also be returned.
|
||||
* SteamAPI_Init() will now return false if the installed Steam client needs to be updated to support the game’s version of the SDK
|
||||
* Improved handling of corrupted tickets via updated sdkencryptedappticket.lib
|
||||
|
||||
----------------------------------------------------------------
|
||||
v1.57 28th April 2022
|
||||
----------------------------------------------------------------
|
||||
|
||||
@@ -517,6 +517,7 @@ struct GameOverlayActivated_t
|
||||
uint8 m_bActive; // true if it's just been activated, false otherwise
|
||||
bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated
|
||||
AppId_t m_nAppID; // the appID of the game (should always be the current game)
|
||||
uint32 m_dwOverlayPID; // used internally
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
/// WARNING: Be *very careful* when using the value provided in callbacks structs.
|
||||
/// Callbacks are queued, and the value that you will receive in your
|
||||
/// callback is the userdata that was effective at the time the callback
|
||||
/// was queued. There are subtle race conditions that can hapen if you
|
||||
/// was queued. There are subtle race conditions that can happen if you
|
||||
/// don't understand this!
|
||||
///
|
||||
/// If any incoming messages for this connection are queued, the userdata
|
||||
@@ -397,10 +397,9 @@ public:
|
||||
/// lanes may be sent out of order. Each lane has its own message number
|
||||
/// sequence. The first message sent on each lane will be assigned the number 1.
|
||||
///
|
||||
/// Each lane has a "priority". Lower priority lanes will only be processed
|
||||
/// when all higher-priority lanes are empty. The magnitudes of the priority
|
||||
/// values are not relevant, only their sort order. Higher numeric values
|
||||
/// take priority over lower numeric values.
|
||||
/// Each lane has a "priority". Lanes with higher numeric values will only be processed
|
||||
/// when all lanes with lower number values are empty. The magnitudes of the priority
|
||||
/// values are not relevant, only their sort order.
|
||||
///
|
||||
/// Each lane also is assigned a weight, which controls the approximate proportion
|
||||
/// of the bandwidth that will be consumed by the lane, relative to other lanes
|
||||
@@ -829,7 +828,7 @@ public:
|
||||
/// different types of traffic. Because these allocations come from a global
|
||||
/// namespace, there is a relatively strict limit on the maximum number of
|
||||
/// ports you may request. (At the time of this writing, the limit is 4.)
|
||||
/// The Port assignments are *not* guaranteed to have any particular order
|
||||
/// The port assignments are *not* guaranteed to have any particular order
|
||||
/// or relationship! Do *not* assume they are contiguous, even though that
|
||||
/// may often occur in practice.
|
||||
///
|
||||
|
||||
@@ -51,12 +51,17 @@ public:
|
||||
// This is set to 0x0 if the resolution is not available
|
||||
virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0;
|
||||
|
||||
// Start Remote Play Together and optionally show the UI in the overlay
|
||||
// This returns false if Remote Play Together can't be started or your game is not configured for Remote Play Together
|
||||
virtual bool BStartRemotePlayTogether( bool bShowOverlay = true ) = 0;
|
||||
|
||||
// Invite a friend to Remote Play Together, or create a guest invite if steamIDFriend is empty
|
||||
// This returns false if the invite can't be sent
|
||||
// This will automatically start Remote Play Together if it hasn't already been started
|
||||
// This returns false if the invite can't be sent or your game is not configured for Remote Play Together
|
||||
virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001"
|
||||
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION002"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamRemotePlay *SteamRemotePlay();
|
||||
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
|
||||
virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax)
|
||||
virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item
|
||||
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item
|
||||
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags, bool bAllowAdminTags = false ) = 0; // change the tags of an UGC item
|
||||
virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder
|
||||
virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
|
||||
virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size.
|
||||
@@ -382,9 +382,12 @@ public:
|
||||
// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
|
||||
STEAM_CALL_RESULT( WorkshopEULAStatus_t )
|
||||
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;
|
||||
|
||||
// Return the user's community content descriptor preferences
|
||||
virtual uint32 GetUserContentDescriptorPreferences( EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION017"
|
||||
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION018"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamUGC *SteamUGC();
|
||||
|
||||
@@ -246,7 +246,7 @@ struct IPCountry_t
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute
|
||||
// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute
|
||||
//-----------------------------------------------------------------------------
|
||||
struct LowBatteryPower_t
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -55,10 +55,32 @@
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
|
||||
|
||||
enum ESteamAPIInitResult
|
||||
{
|
||||
k_ESteamAPIInitResult_OK = 0,
|
||||
k_ESteamAPIInitResult_FailedGeneric = 1, // Some other failure
|
||||
k_ESteamAPIInitResult_NoSteamClient = 2, // We cannot connect to Steam, steam probably isn't running
|
||||
k_ESteamAPIInitResult_VersionMismatch = 3, // Steam client appears to be out of date
|
||||
};
|
||||
|
||||
// SteamAPI_Init must be called before using any other API functions. If it fails, an
|
||||
// error message will be output to the debugger (or stderr) with further information.
|
||||
S_API bool S_CALLTYPE SteamAPI_Init();
|
||||
// Initialize the Steamworks SDK.
|
||||
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, if pOutErrMsg is non-NULL,
|
||||
// it will receive a non-localized message that explains the reason for the failure
|
||||
//
|
||||
// Example usage:
|
||||
//
|
||||
// SteamErrMsg errMsg;
|
||||
// if ( SteamAPI_Init(&errMsg) != k_ESteamAPIInitResult_OK )
|
||||
// FatalError( "Failed to init Steam. %s", errMsg );
|
||||
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg );
|
||||
|
||||
// Initialize the SDK, without worrying about the cause of failure.
|
||||
// This function is included for compatibility with older SDK.
|
||||
// You can use it if you don't care about decent error handling
|
||||
inline bool SteamAPI_Init()
|
||||
{
|
||||
return SteamAPI_InitEx( NULL ) == k_ESteamAPIInitResult_OK;
|
||||
}
|
||||
|
||||
// SteamAPI_Shutdown should be called during process shutdown if possible.
|
||||
S_API void S_CALLTYPE SteamAPI_Shutdown();
|
||||
@@ -294,4 +316,47 @@ inline bool CSteamAPIContext::Init()
|
||||
|
||||
#endif
|
||||
|
||||
// Internal implementation of SteamAPI_InitEx. This is done in a way that checks
|
||||
// all of the versions of interfaces from headers being compiled into this code.
|
||||
// If you are not using any of the C++ interfaces and do not need this version checking
|
||||
// (for example if you are only using the "flat" interfaces, which have a different type
|
||||
// of version checking), you can pass a NULL interface version string.
|
||||
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_SteamAPI_Init( const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
|
||||
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg )
|
||||
{
|
||||
const char *pszInternalCheckInterfaceVersions =
|
||||
STEAMUTILS_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"
|
||||
|
||||
STEAMAPPLIST_INTERFACE_VERSION "\0"
|
||||
STEAMAPPS_INTERFACE_VERSION "\0"
|
||||
STEAMCONTROLLER_INTERFACE_VERSION "\0"
|
||||
STEAMFRIENDS_INTERFACE_VERSION "\0"
|
||||
STEAMGAMESEARCH_INTERFACE_VERSION "\0"
|
||||
STEAMHTMLSURFACE_INTERFACE_VERSION "\0"
|
||||
STEAMHTTP_INTERFACE_VERSION "\0"
|
||||
STEAMINPUT_INTERFACE_VERSION "\0"
|
||||
STEAMINVENTORY_INTERFACE_VERSION "\0"
|
||||
STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "\0"
|
||||
STEAMMATCHMAKING_INTERFACE_VERSION "\0"
|
||||
STEAMMUSICREMOTE_INTERFACE_VERSION "\0"
|
||||
STEAMMUSIC_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKING_INTERFACE_VERSION "\0"
|
||||
STEAMPARENTALSETTINGS_INTERFACE_VERSION "\0"
|
||||
STEAMPARTIES_INTERFACE_VERSION "\0"
|
||||
STEAMREMOTEPLAY_INTERFACE_VERSION "\0"
|
||||
STEAMREMOTESTORAGE_INTERFACE_VERSION "\0"
|
||||
STEAMSCREENSHOTS_INTERFACE_VERSION "\0"
|
||||
STEAMUGC_INTERFACE_VERSION "\0"
|
||||
STEAMUSERSTATS_INTERFACE_VERSION "\0"
|
||||
STEAMUSER_INTERFACE_VERSION "\0"
|
||||
STEAMVIDEO_INTERFACE_VERSION "\0"
|
||||
|
||||
"\0";
|
||||
|
||||
return SteamInternal_SteamAPI_Init( pszInternalCheckInterfaceVersions, pOutErrMsg );
|
||||
}
|
||||
|
||||
#endif // STEAM_API_H
|
||||
|
||||
+14236
-14147
File diff suppressed because it is too large
Load Diff
@@ -49,6 +49,11 @@ typedef int32 HSteamPipe;
|
||||
// handle to single instance of a steam user
|
||||
typedef int32 HSteamUser;
|
||||
|
||||
// A fixed size buffer to receive an error message that is returned by some API
|
||||
// calls.
|
||||
const int k_cchMaxSteamErrMsg = 1024;
|
||||
typedef char SteamErrMsg[ k_cchMaxSteamErrMsg ];
|
||||
|
||||
// #define away __cdecl on posix.
|
||||
// This is really, really bad. We're sorry. But it's been this way for
|
||||
// a long time now and it's scary to change it, as there may be others that
|
||||
|
||||
@@ -754,14 +754,14 @@ S_API bool SteamAPI_ISteamController_GetControllerBindingRevision( ISteamControl
|
||||
// ISteamUGC
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamUGC *SteamAPI_SteamUGC_v017();
|
||||
S_API ISteamUGC *SteamAPI_SteamUGC_v018();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamUGC(), but using this ensures that you are using a matching library.
|
||||
inline ISteamUGC *SteamAPI_SteamUGC() { return SteamAPI_SteamUGC_v017(); }
|
||||
inline ISteamUGC *SteamAPI_SteamUGC() { return SteamAPI_SteamUGC_v018(); }
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v017();
|
||||
S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v018();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamGameServerUGC(), but using this ensures that you are using a matching library.
|
||||
inline ISteamUGC *SteamAPI_SteamGameServerUGC() { return SteamAPI_SteamGameServerUGC_v017(); }
|
||||
inline ISteamUGC *SteamAPI_SteamGameServerUGC() { return SteamAPI_SteamGameServerUGC_v018(); }
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
|
||||
S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor );
|
||||
@@ -810,7 +810,7 @@ S_API bool SteamAPI_ISteamUGC_SetItemDescription( ISteamUGC* self, UGCUpdateHand
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemUpdateLanguage( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchLanguage );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemMetadata( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchMetaData );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemVisibility( ISteamUGC* self, UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags, bool bAllowAdminTags );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemContent( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszContentFolder );
|
||||
S_API bool SteamAPI_ISteamUGC_SetItemPreview( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszPreviewFile );
|
||||
S_API bool SteamAPI_ISteamUGC_SetAllowLegacyUpload( ISteamUGC* self, UGCUpdateHandle_t handle, bool bAllowLegacyUpload );
|
||||
@@ -851,6 +851,7 @@ S_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies( ISteamUGC* self, Pub
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
|
||||
S_API bool SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
|
||||
S_API SteamAPICall_t SteamAPI_ISteamUGC_GetWorkshopEULAStatus( ISteamUGC* self );
|
||||
S_API uint32 SteamAPI_ISteamUGC_GetUserContentDescriptorPreferences( ISteamUGC* self, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries );
|
||||
|
||||
// ISteamAppList
|
||||
|
||||
@@ -961,13 +962,18 @@ S_API bool SteamAPI_ISteamInventory_InspectItem( ISteamInventory* self, SteamInv
|
||||
// ISteamVideo
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamVideo *SteamAPI_SteamVideo_v002();
|
||||
S_API ISteamVideo *SteamAPI_SteamVideo_v003();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamVideo(), but using this ensures that you are using a matching library.
|
||||
inline ISteamVideo *SteamAPI_SteamVideo() { return SteamAPI_SteamVideo_v002(); }
|
||||
inline ISteamVideo *SteamAPI_SteamVideo() { return SteamAPI_SteamVideo_v003(); }
|
||||
S_API void SteamAPI_ISteamVideo_GetVideoURL( ISteamVideo* self, AppId_t unVideoAppID );
|
||||
S_API bool SteamAPI_ISteamVideo_IsBroadcasting( ISteamVideo* self, int * pnNumViewers );
|
||||
S_API void SteamAPI_ISteamVideo_GetOPFSettings( ISteamVideo* self, AppId_t unVideoAppID );
|
||||
S_API bool SteamAPI_ISteamVideo_GetOPFStringForApp( ISteamVideo* self, AppId_t unVideoAppID, char * pchBuffer, int32 * pnBufferSize );
|
||||
S_API void SteamAPI_ISteamVideo_AddTimelineHighlightMarker( ISteamVideo* self, const char * pchIcon, const char * pchTitle, const char * pchDescription, uint32 unPriority );
|
||||
S_API void SteamAPI_ISteamVideo_AddTimelineTimestamp( ISteamVideo* self, const char * pchTitle );
|
||||
S_API void SteamAPI_ISteamVideo_AddTimelineRangeStart( ISteamVideo* self, const char * pchID, const char * pchTitle );
|
||||
S_API void SteamAPI_ISteamVideo_AddTimelineRangeEnd( ISteamVideo* self, const char * pchID );
|
||||
S_API void SteamAPI_ISteamVideo_SetTimelineGameMode( ISteamVideo* self, ETimelineGameMode eMode );
|
||||
|
||||
// ISteamParentalSettings
|
||||
|
||||
@@ -985,15 +991,16 @@ S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList( ISteamParental
|
||||
// ISteamRemotePlay
|
||||
|
||||
// A versioned accessor is exported by the library
|
||||
S_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v001();
|
||||
S_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v002();
|
||||
// Inline, unversioned accessor to get the current version. Essentially the same as SteamRemotePlay(), but using this ensures that you are using a matching library.
|
||||
inline ISteamRemotePlay *SteamAPI_SteamRemotePlay() { return SteamAPI_SteamRemotePlay_v001(); }
|
||||
inline ISteamRemotePlay *SteamAPI_SteamRemotePlay() { return SteamAPI_SteamRemotePlay_v002(); }
|
||||
S_API uint32 SteamAPI_ISteamRemotePlay_GetSessionCount( ISteamRemotePlay* self );
|
||||
S_API RemotePlaySessionID_t SteamAPI_ISteamRemotePlay_GetSessionID( ISteamRemotePlay* self, int iSessionIndex );
|
||||
S_API uint64_steamid SteamAPI_ISteamRemotePlay_GetSessionSteamID( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
|
||||
S_API const char * SteamAPI_ISteamRemotePlay_GetSessionClientName( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
|
||||
S_API ESteamDeviceFormFactor SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
|
||||
S_API bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID, int * pnResolutionX, int * pnResolutionY );
|
||||
S_API bool SteamAPI_ISteamRemotePlay_BStartRemotePlayTogether( ISteamRemotePlay* self, bool bShowOverlay );
|
||||
S_API bool SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite( ISteamRemotePlay* self, uint64_steamid steamIDFriend );
|
||||
|
||||
// ISteamNetworkingMessages
|
||||
|
||||
@@ -48,7 +48,17 @@ const uint16 MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = STEAMGAMESERVER_QUERY_
|
||||
// ISteamGameServer::GetNextOutgoingPacket.)
|
||||
// - The version string should be in the form x.x.x.x, and is used by the master server to detect when the
|
||||
// server is out of date. (Only servers with the latest version will be listed.)
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
//
|
||||
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, if pOutErrMsg is non-NULL,
|
||||
// it will receive a non-localized message that explains the reason for the failure
|
||||
inline ESteamAPIInitResult SteamGameServer_InitEx( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, SteamErrMsg *pOutErrMsg );
|
||||
|
||||
// This function is included for compatibility with older SDK.
|
||||
// You can use it if you don't care about decent error handling
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString )
|
||||
{
|
||||
return SteamGameServer_InitEx( unIP, usGamePort, usQueryPort, eServerMode, pchVersionString, NULL ) == k_ESteamAPIInitResult_OK;
|
||||
}
|
||||
|
||||
// Shutdown SteamGameSeverXxx interfaces, log out, and free resources.
|
||||
S_API void SteamGameServer_Shutdown();
|
||||
@@ -101,13 +111,23 @@ inline bool CSteamGameServerAPIContext::Init()
|
||||
}
|
||||
#endif
|
||||
|
||||
S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usLegacySteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString );
|
||||
inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString )
|
||||
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_GameServer_Init_V2( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
|
||||
inline ESteamAPIInitResult SteamGameServer_InitEx( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString, SteamErrMsg *pOutErrMsg )
|
||||
{
|
||||
if ( !SteamInternal_GameServer_Init( unIP, 0, usGamePort, usQueryPort, eServerMode, pchVersionString ) )
|
||||
return false;
|
||||
const char *pszInternalCheckInterfaceVersions =
|
||||
STEAMUTILS_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"
|
||||
|
||||
return true;
|
||||
STEAMGAMESERVER_INTERFACE_VERSION "\0"
|
||||
STEAMGAMESERVERSTATS_INTERFACE_VERSION "\0"
|
||||
STEAMHTTP_INTERFACE_VERSION "\0"
|
||||
STEAMINVENTORY_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKING_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
|
||||
STEAMUGC_INTERFACE_VERSION "\0"
|
||||
"\0";
|
||||
return SteamInternal_GameServer_Init_V2( unIP, usGamePort, usQueryPort, eServerMode, pchVersionString, pszInternalCheckInterfaceVersions, pOutErrMsg );
|
||||
}
|
||||
inline void SteamGameServer_ReleaseCurrentThreadMemory()
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK )
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE extern "C"
|
||||
#elif defined( STEAMNETWORKINGSOCKETS_FOREXPORT )
|
||||
#ifdef _WIN32
|
||||
#if defined( _WIN32 ) || defined( __ORBIS__ ) || defined( __PROSPERO__ )
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __declspec( dllexport )
|
||||
#else
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __attribute__((visibility("default")))
|
||||
@@ -1152,6 +1152,42 @@ enum ESteamNetworkingConfigValue
|
||||
/// Default is 512k (524288 bytes)
|
||||
k_ESteamNetworkingConfig_SendBufferSize = 9,
|
||||
|
||||
/// [connection int32] Upper limit on total size (in bytes) of received messages
|
||||
/// that will be buffered waiting to be processed by the application. If this limit
|
||||
/// is exceeded, packets will be dropped. This is to protect us from a malicious
|
||||
/// peer flooding us with messages faster than we can process them.
|
||||
///
|
||||
/// This must be bigger than k_ESteamNetworkingConfig_RecvMaxMessageSize
|
||||
k_ESteamNetworkingConfig_RecvBufferSize = 47,
|
||||
|
||||
/// [connection int32] Upper limit on the number of received messages that will
|
||||
/// that will be buffered waiting to be processed by the application. If this limit
|
||||
/// is exceeded, packets will be dropped. This is to protect us from a malicious
|
||||
/// peer flooding us with messages faster than we can pull them off the wire.
|
||||
k_ESteamNetworkingConfig_RecvBufferMessages = 48,
|
||||
|
||||
/// [connection int32] Maximum message size that we are willing to receive.
|
||||
/// if a client attempts to send us a message larger than this, the connection
|
||||
/// will be immediately closed.
|
||||
///
|
||||
/// Default is 512k (524288 bytes). Note that the peer needs to be able to
|
||||
/// send a message this big. (See k_cbMaxSteamNetworkingSocketsMessageSizeSend.)
|
||||
k_ESteamNetworkingConfig_RecvMaxMessageSize = 49,
|
||||
|
||||
/// [connection int32] Max number of message segments that can be received
|
||||
/// in a single UDP packet. While decoding a packet, if the number of segments
|
||||
/// exceeds this, we will abort further packet processing.
|
||||
///
|
||||
/// The default is effectively unlimited. If you know that you very rarely
|
||||
/// send small packets, you can protect yourself from malicious senders by
|
||||
/// lowering this number.
|
||||
///
|
||||
/// In particular, if you are NOT using the reliability layer and are only using
|
||||
/// SteamNetworkingSockets for datagram transport, setting this to a very low
|
||||
/// number may be beneficial. (We recommend a value of 2.) Make sure your sender
|
||||
/// disables Nagle!
|
||||
k_ESteamNetworkingConfig_RecvMaxSegmentsPerPacket = 50,
|
||||
|
||||
/// [connection int64] Get/set userdata as a configuration option.
|
||||
/// The default value is -1. You may want to set the user data as
|
||||
/// a config value, instead of using ISteamNetworkingSockets::SetConnectionUserData
|
||||
@@ -1187,9 +1223,12 @@ enum ESteamNetworkingConfigValue
|
||||
// ensure you have the current value.
|
||||
k_ESteamNetworkingConfig_ConnectionUserData = 40,
|
||||
|
||||
/// [connection int32] Minimum/maximum send rate clamp, 0 is no limit.
|
||||
/// This value will control the min/max allowed sending rate that
|
||||
/// bandwidth estimation is allowed to reach. Default is 0 (no-limit)
|
||||
/// [connection int32] Minimum/maximum send rate clamp, in bytes/sec.
|
||||
/// At the time of this writing these two options should always be set to
|
||||
/// the same value, to manually configure a specific send rate. The default
|
||||
/// value is 256K. Eventually we hope to have the library estimate the bandwidth
|
||||
/// of the channel and set the send rate to that estimated bandwidth, and these
|
||||
/// values will only set limits on that send rate.
|
||||
k_ESteamNetworkingConfig_SendRateMin = 10,
|
||||
k_ESteamNetworkingConfig_SendRateMax = 11,
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user