public void AdvertiseGame(SteamID gameServerSteamID, IPAddress ip, ushort port) { byte[] addressBytes = ip.GetAddressBytes(); uint serverIP = (uint)((int)addressBytes[0] << 24 | (int)addressBytes[1] << 16 | (int)addressBytes[2] << 8) | (uint)addressBytes[3]; User.SteamUnityAPI_SteamUser_AdvertiseGame(this._user, gameServerSteamID.ToUInt64(), serverIP, port); }
public void SendP2PPacket(SteamID steamID, byte[] data, EP2PSend sendType, int channel = 0) { IntPtr num = Marshal.AllocHGlobal(data.Length); Marshal.Copy(data, 0, num, data.Length); Networking.SteamUnityAPI_SteamNetworking_SendP2PPacket(this._networking, steamID.ToUInt64(), num, (uint)data.Length, (byte)sendType, channel); Marshal.FreeHGlobal(num); }
public EUserHasLicenseForAppResult UserHasLicenseForApp(SteamID steamID, uint appID) { return(User.SteamUnityAPI_SteamUser_UserHasLicenseForApp(this._user, steamID.ToUInt64(), appID)); }
public bool InitiateClientAuthentication(out byte[] authTicket, SteamID steamIDServer, IPAddress ipServer, ushort serverPort, bool isSecure) { byte[] addressBytes = ipServer.GetAddressBytes(); this._serverIP = (uint)((int)addressBytes[0] << 24 | (int)addressBytes[1] << 16 | (int)addressBytes[2] << 8) | (uint)addressBytes[3]; this._serverPort = serverPort; byte[] authTicket1 = new byte[2048]; int length = User.SteamUnityAPI_SteamUser_InitiateGameConnection(this._user, authTicket1, 2048, steamIDServer.ToUInt64(), this._serverIP, this._serverPort, isSecure); if (length > 0) { authTicket = new byte[length]; for (int index = 0; index < length; ++index) { authTicket[index] = authTicket1[index]; } return(true); } else { authTicket = (byte[])null; return(false); } }
public void SendP2PPacket(SteamID steamID, byte[] data, EP2PSend sendType, int channel = 0) { IntPtr num = Marshal.AllocHGlobal(data.Length); Marshal.Copy(data, 0, num, data.Length); Networking.SteamUnityAPI_SteamNetworking_SendP2PPacket(this._networking, steamID.ToUInt64(), num, (uint) data.Length, (byte) sendType, channel); Marshal.FreeHGlobal(num); }
public void ClientDisconnected(SteamID steamIDClient) { bool flag = false; foreach (SteamID steamId in this._playersPendingAuth) { if (steamId == steamIDClient) { GameServer.SteamUnityAPI_SteamGameServer_SendUserDisconnect(this._gameServer, steamIDClient.ToUInt64()); flag = true; break; } } if (!flag) { foreach (SteamID steamId in this._playersConnected) { if (steamId == steamIDClient) { GameServer.SteamUnityAPI_SteamGameServer_SendUserDisconnect(this._gameServer, steamIDClient.ToUInt64()); flag = true; break; } } } if (!flag) { foreach (SteamID steamId in this._botsConnected) { if (steamId == steamIDClient) { GameServer.SteamUnityAPI_SteamGameServer_SendUserDisconnect(this._gameServer, steamIDClient.ToUInt64()); break; } } } this._playersPendingAuth.Remove(steamIDClient); this._playersConnected.Remove(steamIDClient); this._botsConnected.Remove(steamIDClient); }
public EUserHasLicenseForAppResult UserHasLicenseForApp(SteamID steamID, uint appID) { return User.SteamUnityAPI_SteamUser_UserHasLicenseForApp(this._user, steamID.ToUInt64(), appID); }
public void CloseP2PSession(SteamID steamID, int channel) { Networking.SteamUnityAPI_SteamNetworking_CloseP2PChannel(this._networking, steamID.ToUInt64(), channel); }
internal EPersonaState GetFriendPersonaState(SteamID steamIDFriend) { return((EPersonaState)Friends.SteamUnityAPI_SteamFriends_GetFriendPersonaState(this._friends, steamIDFriend.ToUInt64())); }
internal string GetFriendPersonaName(SteamID steamIDFriend) { return(Friends.SteamUnityAPI_SteamFriends_GetFriendPersonaName(this._friends, steamIDFriend.ToUInt64())); }
public void ActivateGameOverlayToUser(string dialog, SteamID user) { Friends.SteamUnityAPI_SteamFriends_ActivateGameOverlayToUser(dialog, user.ToUInt64()); }
internal Image GetLargeFriendAvatar(SteamID steamIDFriend, OnLargeAvatarReceived largeAvatarReceivedCallback) { this._largeAvatarReceivedCallback = largeAvatarReceivedCallback; if (this._internalOnLargeAvatarReceived == null) { this._internalOnLargeAvatarReceived = new OnLargeAvatarReceivedFromSteam(this.InternalOnLargeAvatarReceived); } int largeFriendAvatar = Friends.SteamUnityAPI_SteamFriends_GetLargeFriendAvatar(this._friends, steamIDFriend.ToUInt64(), Marshal.GetFunctionPointerForDelegate((Delegate)this._internalOnLargeAvatarReceived)); if (largeFriendAvatar == -1) { return((Image)null); } Image avatar = new Image(largeFriendAvatar); if (this._largeAvatarReceivedCallback != null) { this._largeAvatarReceivedCallback(steamIDFriend, avatar); } return(avatar); }
public void JoinLobby(SteamID steamIDLobby, OnLobbyJoined onLobbyJoined) { if (this._lobbyJoined != null) { this.LeaveLobby(); } foreach (Lobby lobby in this._lobbyList) { if (lobby.SteamID == steamIDLobby) { this._lobbyJoined = lobby; break; } } this._onLobbyJoined = onLobbyJoined; CommunityExpress.Instance.AddLobbyJoinedCallback(Matchmaking.SteamUnityAPI_SteamMatchmaking_JoinLobby(this._matchmaking, steamIDLobby.ToUInt64()), new OnMatchmakingLobbyJoinedFromSteam(this.OnLobbyJoinedCallback)); }
internal string GetClanTag(SteamID steamIDClan) { return(Groups.SteamUnityAPI_SteamFriends_GetClanTag(this._friends, steamIDClan.ToUInt64())); }
internal string GetGroupName(SteamID steamIDGroup) { return(Groups.SteamUnityAPI_SteamFriends_GetClanName(this._friends, steamIDGroup.ToUInt64())); }
internal Image GetSmallFriendAvatar(SteamID steamIDFriend) { int smallFriendAvatar = Friends.SteamUnityAPI_SteamFriends_GetSmallFriendAvatar(this._friends, steamIDFriend.ToUInt64()); if (smallFriendAvatar != -1) { return(new Image(smallFriendAvatar)); } else { return((Image)null); } }
public void CloseP2PSession(SteamID steamID) { Networking.SteamUnityAPI_SteamNetworking_CloseP2PSession(this._networking, steamID.ToUInt64()); }
public void CloseP2PSession(SteamID steamID) { Networking.SteamUnityAPI_SteamNetworking_CloseP2PSession(this._networking, steamID.ToUInt64()); }
public void SendP2PPacket(SteamID steamID, string data, EP2PSend sendType, int channel = 0) { Networking.SteamUnityAPI_SteamNetworking_SendP2PPacket(this._networking, steamID.ToUInt64(), Marshal.StringToHGlobalAnsi(data), (uint)data.Length, (byte)sendType, channel); }
public void CloseP2PSession(SteamID steamID, int channel) { Networking.SteamUnityAPI_SteamNetworking_CloseP2PChannel(this._networking, steamID.ToUInt64(), channel); }
public bool InitiateClientAuthentication(out byte[] authTicket, SteamID steamIDServer, IPAddress ipServer, ushort serverPort, bool isSecure) { byte[] addressBytes = ipServer.GetAddressBytes(); this._serverIP = (uint) ((int) addressBytes[0] << 24 | (int) addressBytes[1] << 16 | (int) addressBytes[2] << 8) | (uint) addressBytes[3]; this._serverPort = serverPort; byte[] authTicket1 = new byte[2048]; int length = User.SteamUnityAPI_SteamUser_InitiateGameConnection(this._user, authTicket1, 2048, steamIDServer.ToUInt64(), this._serverIP, this._serverPort, isSecure); if (length > 0) { authTicket = new byte[length]; for (int index = 0; index < length; ++index) authTicket[index] = authTicket1[index]; return true; } else { authTicket = (byte[]) null; return false; } }
public void SendP2PPacket(SteamID steamID, string data, EP2PSend sendType, int channel = 0) { Networking.SteamUnityAPI_SteamNetworking_SendP2PPacket(this._networking, steamID.ToUInt64(), Marshal.StringToHGlobalAnsi(data), (uint) data.Length, (byte) sendType, channel); }
public void AdvertiseGame(SteamID gameServerSteamID, IPAddress ip, ushort port) { byte[] addressBytes = ip.GetAddressBytes(); uint serverIP = (uint) ((int) addressBytes[0] << 24 | (int) addressBytes[1] << 16 | (int) addressBytes[2] << 8) | (uint) addressBytes[3]; User.SteamUnityAPI_SteamUser_AdvertiseGame(this._user, gameServerSteamID.ToUInt64(), serverIP, port); }
public bool UpdateUserDetails(SteamID steamID, string displayableName, uint score) { return(GameServer.SteamUnityAPI_SteamGameServer_UpdateUserData(this._gameServer, steamID.ToUInt64(), displayableName, score)); }