Rise
The Vieneo Province
Loading...
Searching...
No Matches
SteamNetworkingIdentity Struct Reference

#include <steamnetworkingtypes.h>

Classes

union  [union].__unnamed0__

Public Types

enum  { k_cchMaxString = 128 , k_cchMaxGenericString = 32 , k_cchMaxXboxPairwiseID = 33 , k_cbMaxGenericBytes = 32 }

Public Member Functions

void Clear ()
bool IsInvalid () const
void SetSteamID (CSteamID steamID)
CSteamID GetSteamID () const
void SetSteamID64 (uint64 steamID)
uint64 GetSteamID64 () const
bool SetXboxPairwiseID (const char *pszString)
const char * GetXboxPairwiseID () const
void SetPSNID (uint64 id)
uint64 GetPSNID () const
void SetIPAddr (const SteamNetworkingIPAddr &addr)
const SteamNetworkingIPAddr * GetIPAddr () const
void SetIPv4Addr (uint32 nIPv4, uint16 nPort)
uint32 GetIPv4 () const
ESteamNetworkingFakeIPType GetFakeIPType () const
bool IsFakeIP () const
void SetLocalHost ()
bool IsLocalHost () const
bool SetGenericString (const char *pszString)
const char * GetGenericString () const
bool SetGenericBytes (const void *data, size_t cbLen)
const uint8 * GetGenericBytes (int &cbLen) const
bool operator== (const SteamNetworkingIdentity &x) const
 See if two identities are identical.
void ToString (char *buf, size_t cbBuf) const
bool ParseString (const char *pszStr)

Public Attributes

ESteamNetworkingIdentityType m_eType
 Type of identity.
int m_cbSize
union  

Detailed Description

An abstract way to represent the identity of a network host. All identities can be represented as simple string. Furthermore, this string representation is actually used on the wire in several places, even though it is less efficient, in order to facilitate forward compatibility. (Old client code can handle an identity type that it doesn't understand.)

Definition at line 257 of file steamnetworkingtypes.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_cchMaxString 
k_cchMaxGenericString 
k_cchMaxXboxPairwiseID 
k_cbMaxGenericBytes 

Definition at line 318 of file steamnetworkingtypes.h.

Member Function Documentation

◆ Clear()

void SteamNetworkingIdentity::Clear ( )
inline

Definition at line 1909 of file steamnetworkingtypes.h.

◆ GetFakeIPType()

ESteamNetworkingFakeIPType SteamNetworkingIdentity::GetFakeIPType ( ) const
inline

Definition at line 1924 of file steamnetworkingtypes.h.

Here is the caller graph for this function:

◆ GetGenericBytes()

const uint8 * SteamNetworkingIdentity::GetGenericBytes ( int & cbLen) const
inline

Definition at line 1932 of file steamnetworkingtypes.h.

◆ GetGenericString()

const char * SteamNetworkingIdentity::GetGenericString ( ) const
inline

Definition at line 1929 of file steamnetworkingtypes.h.

◆ GetIPAddr()

const SteamNetworkingIPAddr * SteamNetworkingIdentity::GetIPAddr ( ) const
inline

Definition at line 1921 of file steamnetworkingtypes.h.

◆ GetIPv4()

uint32 SteamNetworkingIdentity::GetIPv4 ( ) const
inline

Definition at line 1923 of file steamnetworkingtypes.h.

◆ GetPSNID()

uint64 SteamNetworkingIdentity::GetPSNID ( ) const
inline

Definition at line 1919 of file steamnetworkingtypes.h.

◆ GetSteamID()

CSteamID SteamNetworkingIdentity::GetSteamID ( ) const
inline

Definition at line 1912 of file steamnetworkingtypes.h.

Here is the call graph for this function:

◆ GetSteamID64()

uint64 SteamNetworkingIdentity::GetSteamID64 ( ) const
inline

Definition at line 1914 of file steamnetworkingtypes.h.

Here is the caller graph for this function:

◆ GetXboxPairwiseID()

const char * SteamNetworkingIdentity::GetXboxPairwiseID ( ) const
inline

Definition at line 1917 of file steamnetworkingtypes.h.

◆ IsFakeIP()

bool SteamNetworkingIdentity::IsFakeIP ( ) const
inline

Definition at line 286 of file steamnetworkingtypes.h.

Here is the call graph for this function:

◆ IsInvalid()

bool SteamNetworkingIdentity::IsInvalid ( ) const
inline

Definition at line 1910 of file steamnetworkingtypes.h.

◆ IsLocalHost()

bool SteamNetworkingIdentity::IsLocalHost ( ) const
inline

Definition at line 1926 of file steamnetworkingtypes.h.

◆ operator==()

bool SteamNetworkingIdentity::operator== ( const SteamNetworkingIdentity & x) const
inline

See if two identities are identical.

Definition at line 1934 of file steamnetworkingtypes.h.

◆ ParseString()

bool SteamNetworkingIdentity::ParseString ( const char * pszStr)
inline

Parse back a string that was generated using ToString. If we don't understand the string, but it looks "reasonable" (it matches the pattern type:<type-data> and doesn't have any funky characters, etc), then we will return true, and the type is set to k_ESteamNetworkingIdentityType_UnknownType. false will only be returned if the string looks invalid.

Definition at line 495 of file isteamnetworkingutils.h.

◆ SetGenericBytes()

bool SteamNetworkingIdentity::SetGenericBytes ( const void * data,
size_t cbLen )
inline

Definition at line 1930 of file steamnetworkingtypes.h.

◆ SetGenericString()

bool SteamNetworkingIdentity::SetGenericString ( const char * pszString)
inline

Definition at line 1927 of file steamnetworkingtypes.h.

◆ SetIPAddr()

void SteamNetworkingIdentity::SetIPAddr ( const SteamNetworkingIPAddr & addr)
inline

Definition at line 1920 of file steamnetworkingtypes.h.

◆ SetIPv4Addr()

void SteamNetworkingIdentity::SetIPv4Addr ( uint32 nIPv4,
uint16 nPort )
inline

Definition at line 1922 of file steamnetworkingtypes.h.

◆ SetLocalHost()

void SteamNetworkingIdentity::SetLocalHost ( )
inline

Definition at line 1925 of file steamnetworkingtypes.h.

◆ SetPSNID()

void SteamNetworkingIdentity::SetPSNID ( uint64 id)
inline

Definition at line 1918 of file steamnetworkingtypes.h.

◆ SetSteamID()

void SteamNetworkingIdentity::SetSteamID ( CSteamID steamID)
inline

Definition at line 1911 of file steamnetworkingtypes.h.

Here is the call graph for this function:

◆ SetSteamID64()

void SteamNetworkingIdentity::SetSteamID64 ( uint64 steamID)
inline

Definition at line 1913 of file steamnetworkingtypes.h.

Here is the caller graph for this function:

◆ SetXboxPairwiseID()

bool SteamNetworkingIdentity::SetXboxPairwiseID ( const char * pszString)
inline

Definition at line 1915 of file steamnetworkingtypes.h.

◆ ToString()

void SteamNetworkingIdentity::ToString ( char * buf,
size_t cbBuf ) const
inline

Print to a human-readable string. This is suitable for debug messages or any other time you need to encode the identity as a string. It has a URL-like format (type:<type-data>). Your buffer should be at least k_cchMaxString bytes big to avoid truncation.

See also SteamNetworkingIPAddrRender

Definition at line 494 of file isteamnetworkingutils.h.

Here is the caller graph for this function:

Member Data Documentation

◆ @117242256275052031302041025256335040131356304331

◆ m_cbSize

int SteamNetworkingIdentity::m_cbSize

Definition at line 331 of file steamnetworkingtypes.h.

◆ m_eType

ESteamNetworkingIdentityType SteamNetworkingIdentity::m_eType

Type of identity.

Definition at line 260 of file steamnetworkingtypes.h.


The documentation for this struct was generated from the following files: