SteamNetworkingIdentity

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.)

Members

Enums

k_cchMaxString
anonymousenum k_cchMaxString
Undocumented in source.

Functions

Clear
void Clear()
Undocumented in source.
GetFakeIPType
ESteamNetworkingFakeIPType GetFakeIPType()
Undocumented in source.
GetGenericBytes
const(ubyte*) GetGenericBytes(int cbLen)
Undocumented in source.
GetGenericString
const(char*) GetGenericString()
Undocumented in source.
GetIPAddr
const(SteamNetworkingIPAddr*) GetIPAddr()
Undocumented in source.
GetIPv4
uint GetIPv4()
Undocumented in source.
GetSteamID
CSteamID GetSteamID()
Undocumented in source.
GetSteamID64
ulong GetSteamID64()
Undocumented in source.
IsFakeIP
bool IsFakeIP()
Undocumented in source. Be warned that the author may not have intended to support it.
IsInvalid
bool IsInvalid()
Undocumented in source.
IsLocalHost
bool IsLocalHost()
Undocumented in source.
ParseString
bool ParseString(char* pszStr)

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.

SetGenericBytes
bool SetGenericBytes(void* data, size_t cbLen)
Undocumented in source.
SetGenericString
bool SetGenericString(char* pszString)
Undocumented in source.
SetIPAddr
void SetIPAddr(SteamNetworkingIPAddr addr)
Undocumented in source.
SetIPv4Addr
void SetIPv4Addr(uint nIPv4, ushort nPort)
Undocumented in source.
SetLocalHost
void SetLocalHost()
Undocumented in source.
SetSteamID
void SetSteamID(CSteamID steamID)
Undocumented in source.
SetSteamID64
void SetSteamID64(ulong steamID)
Undocumented in source.
ToString
void ToString(char* buf, size_t cbBuf)

See if two identities are identical 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.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

m_cbSize
int m_cbSize;
Undocumented in source.
m_eType
ESteamNetworkingIdentityType m_eType;

Type of identity.

Meta