/// Print to a string, with or without the port.  Mapped IPv4 addresses are printed
		/// as dotted decimal (12.34.56.78), otherwise this will print the canonical
		/// form according to RFC5952.  If you include the port, IPv6 will be surrounded by
		/// brackets, e.g. [::1:2]:80.  Your buffer should be at least k_cchMaxString bytes
		/// to avoid truncation
		///
		/// See also SteamNetworkingIdentityRender
		public void ToString(out string buf, bool bWithPort) {
			IntPtr buf2 = Marshal.AllocHGlobal(k_cchMaxString);
			NativeMethods.SteamAPI_SteamNetworkingIPAddr_ToString(ref this, buf2, k_cchMaxString, bWithPort);
			buf = InteropHelp.PtrToStringUTF8(buf2);
			Marshal.FreeHGlobal(buf2);
		}
Exemple #2
0
		// Returns nullptr if not generic string type
		public string GetGenericString() {
			return InteropHelp.PtrToStringUTF8(NativeMethods.SteamAPI_SteamNetworkingIdentity_GetGenericString(ref this));
		}
 public static string GetSessionClientName(RemotePlaySessionID_t unSessionID)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemotePlay_GetSessionClientName(CSteamAPIContext.GetSteamRemotePlay(), unSessionID)));
 }
Exemple #4
0
		/// 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
		public void ToString(out string buf) {
			IntPtr buf2 = Marshal.AllocHGlobal(k_cchMaxString);
			NativeMethods.SteamNetworkingIdentity_ToString(ref this, buf2, k_cchMaxString);
			buf = InteropHelp.PtrToStringUTF8(buf2);
			Marshal.FreeHGlobal(buf2);
		}
Exemple #5
0
 /// <summary>
 /// <para> Get a local path to art for on-screen glyph for a particular Xbox controller origin</para>
 /// </summary>
 public static string GetGlyphForXboxOrigin(EXboxOrigin eOrigin)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetGlyphForXboxOrigin(CSteamAPIContext.GetSteamInput(), eOrigin)));
 }