protected void HandlePlayerConnect(RakNet.SystemAddress _cSystemAddress, RakNet.RakNetGUID _cGuid) { // Create network player instance for new player CNetworkPlayer cNetworkPlayer = gameObject.AddComponent <CNetworkPlayer>(); // Check is host by matching address and connection guid bool bIsHost = _cGuid.g == CNetwork.Connection.RakPeer.GetMyGUID().g; // Initialise player instance cNetworkPlayer.Initialise(_cSystemAddress, _cGuid, bIsHost); // Store network player instance s_mNetworkPlayers.Add(cNetworkPlayer.Guid.g, cNetworkPlayer); // Join notice Logger.Write("A player has joined. Instance id ({0}) System address ({1}) Guid ({2})", cNetworkPlayer.PlayerId, _cSystemAddress, _cGuid); // Notify event observers if (EventPlayerConnect != null) { EventPlayerConnect(cNetworkPlayer); } // Update server info, player count UpdateServerInfo(); // Tell player that he has been given the initial game state cNetworkPlayer.SetDownloadingInitialGameStateComplete(); }
public void Initialise(RakNet.SystemAddress _cSystemAddress, RakNet.RakNetGUID _cGuid, bool _bHost) { ResetNetworkViewSteam(); m_cSystemAddress = new RakNet.SystemAddress(_cSystemAddress.ToString(), _cSystemAddress.GetPort()); m_cGuid = new RakNet.RakNetGUID(_cGuid.g); m_bHost = _bHost; }
public void GetParticipantList(RakNetGUID[] participantList) { RakNetListRakNetGUID passListGUID = new RakNetListRakNetGUID(); GetParticipantListHelper(passListGUID); for (int i = 0; i < participantList.Length && i < passListGUID.Size(); i++) { participantList[i] = passListGUID[i]; } }
protected void HandlePlayerMicrophoneAudio(RakNet.RakNetGUID _cPlayerGuid, byte[] _baData) { if (EventRecievedPlayerMicrophoneAudio != null) { CNetworkStream cAudioDataStream = new CNetworkStream(_baData); cAudioDataStream.IgnoreBytes(1); EventRecievedPlayerMicrophoneAudio(FindNetworkPlayer(_cPlayerGuid.g), cAudioDataStream); } }
public bool GetConnectionListForRemoteSystem(RakNetGUID remoteSystemGuid, SystemAddress[] saOut, RakNetGUID[] guidOut, ref uint inOutLength) { uint minLength = inOutLength; if (guidOut.Length < minLength) { minLength = (uint)guidOut.Length; } if (saOut.Length < minLength) { minLength = (uint)saOut.Length; } RakNetListRakNetGUID passListGUID = new RakNetListRakNetGUID(); RakNetListSystemAddress passListSystemAddress = new RakNetListSystemAddress(); bool returnVal = GetConnectionListForRemoteSystemHelper(remoteSystemGuid, passListSystemAddress, passListGUID, ref inOutLength); if (inOutLength< minLength) { minLength = (uint)inOutLength;} for (int i = 0; i < minLength; i++) { guidOut[i] = passListGUID[i]; saOut[i] = passListSystemAddress[i]; } return returnVal; }
public void SetHostGuid(RakNetGUID _hostGuid) { RakNetPINVOKE.TeamBalancer_SetHostGuid(swigCPtr, RakNetGUID.getCPtr(_hostGuid)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public RakNetGUID GetHostSystem() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.FullyConnectedMesh2_GetHostSystem(swigCPtr), true); return ret; }
public bool RequestForwarding(SystemAddress proxyCoordinator, SystemAddress sourceAddress, RakNetGUID targetGuid, uint timeoutOnNoDataMS) { bool ret = RakNetPINVOKE.UDPProxyClient_RequestForwarding__SWIG_3(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), RakNetGUID.getCPtr(targetGuid), timeoutOnNoDataMS); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool HasParticipant(RakNetGUID participantGuid) { bool ret = RakNetPINVOKE.FullyConnectedMesh2_HasParticipant(swigCPtr, RakNetGUID.getCPtr(participantGuid)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual RakNetGUID GetMyGUID() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeerInterface_GetMyGUID(swigCPtr), true); return ret; }
private RakNetConnection RemoveConnection(RakNetGUID guid) { RakNetConnection connection; _connections.TryRemove(guid.g, out connection); return connection; }
private bool OpLess(RakNetGUID right) { bool ret = RakNetPINVOKE.RakNetGUID_OpLess(swigCPtr, RakNetGUID.getCPtr(right)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public RakNetGUID GetMyGUIDUnified() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.CSharp_PluginInterface2_GetMyGUIDUnified(swigCPtr), true); return(ret); }
internal static HandleRef getCPtr(RakNetGUID obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
public void AddParticipant(SystemAddress systemAddress, RakNetGUID rakNetGUID) { RakNetPINVOKE.ConnectionGraph2_AddParticipant(swigCPtr, SystemAddress.getCPtr(systemAddress), RakNetGUID.getCPtr(rakNetGUID)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } }
private bool GetConnectionListForRemoteSystemHelper(RakNetGUID remoteSystemGuid, RakNetListSystemAddress saOut, RakNetListRakNetGUID guidOut, ref uint inOutLength) { bool ret = RakNetPINVOKE.ConnectionGraph2_GetConnectionListForRemoteSystemHelper(swigCPtr, RakNetGUID.getCPtr(remoteSystemGuid), RakNetListSystemAddress.getCPtr(saOut), RakNetListRakNetGUID.getCPtr(guidOut), ref inOutLength); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public RakNetGUID GetLowestAveragePingSystem() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.ConnectionGraph2_GetLowestAveragePingSystem(swigCPtr), true); return(ret); }
public ushort GetPingBetweenSystems(RakNetGUID g1, RakNetGUID g2) { ushort ret = RakNetPINVOKE.ConnectionGraph2_GetPingBetweenSystems(swigCPtr, RakNetGUID.getCPtr(g1), RakNetGUID.getCPtr(g2)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool ConnectionExists(RakNetGUID g1, RakNetGUID g2) { bool ret = RakNetPINVOKE.ConnectionGraph2_ConnectionExists(swigCPtr, RakNetGUID.getCPtr(g1), RakNetGUID.getCPtr(g2)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void EstablishRouting(RakNetGUID endpointGuid) { RakNetPINVOKE.Router2_EstablishRouting(swigCPtr, RakNetGUID.getCPtr(endpointGuid)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public AddressOrGUID(RakNetGUID input) : this(RakNetPINVOKE.new_AddressOrGUID__SWIG_3(RakNetGUID.getCPtr(input)), true) { if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } }
private RakNetConnection GetConnection(RakNetGUID guid) { return _connections[guid.g]; }
public AddressOrGUID CopyData(RakNetGUID input) { AddressOrGUID ret = new AddressOrGUID(RakNetPINVOKE.AddressOrGUID_CopyData__SWIG_2(swigCPtr, RakNetGUID.getCPtr(input)), false); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public RakNetGUID CopyData(RakNetGUID input) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakNetGUID_CopyData(swigCPtr, RakNetGUID.getCPtr(input)), false); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public void Replace(RakNetGUID input, RakNetGUID filler, uint position, string file, uint line) { RakNetPINVOKE.RakNetListRakNetGUID_Replace__SWIG_0(swigCPtr, RakNetGUID.getCPtr(input), RakNetGUID.getCPtr(filler), position, file, line); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } }
public bool OpenNAT(RakNetGUID destination, SystemAddress facilitator) { bool ret = RakNetPINVOKE.NatPunchthroughClient_OpenNAT(swigCPtr, RakNetGUID.getCPtr(destination), SystemAddress.getCPtr(facilitator)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public RakNetGUID Get(uint position) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakNetListRakNetGUID_Get(swigCPtr, position), false); return(ret); }
public RakNetGUID GetHostSystem() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.FullyConnectedMesh2_GetHostSystem(swigCPtr), true); return(ret); }
public RakNetGUID Pop() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakNetListRakNetGUID_Pop(swigCPtr), false); return(ret); }
public virtual SystemAddress GetSystemAddressFromGuid(RakNetGUID input) { SystemAddress ret = new SystemAddress(RakNetPINVOKE.RakPeerInterface_GetSystemAddressFromGuid(swigCPtr, RakNetGUID.getCPtr(input)), true); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual RakNetGUID GetGUIDFromIndex(uint index) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeerInterface_GetGUIDFromIndex(swigCPtr, index), true); return(ret); }
public bool GetConnectionListForRemoteSystem(RakNetGUID remoteSystemGuid, SystemAddress saOut, RakNetGUID guidOut, out uint outLength) { bool ret = RakNetPINVOKE.ConnectionGraph2_GetConnectionListForRemoteSystem(swigCPtr, RakNetGUID.getCPtr(remoteSystemGuid), SystemAddress.getCPtr(saOut), RakNetGUID.getCPtr(guidOut), out outLength); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual RakNetGUID GetMyGUID() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeerInterface_GetMyGUID(swigCPtr), true); return(ret); }
public RakNetGUID GetMyGUIDUnified() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.PluginInterface2_GetMyGUIDUnified(swigCPtr), true); return ret; }
public virtual SystemAddress GetSystemAddressFromGuid(RakNetGUID input) { SystemAddress ret = new SystemAddress(RakNetPINVOKE.RakPeerInterface_GetSystemAddressFromGuid(swigCPtr, RakNetGUID.getCPtr(input)), true); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public AddressOrGUID(RakNetGUID input) : this(RakNetPINVOKE.new_AddressOrGUID__SWIG_4(RakNetGUID.getCPtr(input)), true) { if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public virtual void OnForwardingInProgress(string proxyIPAddress, ushort proxyPort, SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) { RakNetPINVOKE.CSharp_UDPProxyClientResultHandler_OnForwardingInProgress(swigCPtr, proxyIPAddress, proxyPort, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } }
public uint GetConnectionRequestIndex(RakNetGUID endpointGuid) { uint ret = RakNetPINVOKE.Router2_GetConnectionRequestIndex(swigCPtr, RakNetGUID.getCPtr(endpointGuid)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual void OnRecipientNotConnected(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) { RakNetPINVOKE.UDPProxyClientResultHandler_OnRecipientNotConnected(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } }
private RakNetConnection CreateNewConnection(RakNetGUID raknetGuid, RakPeerInterface peer) { var cid = _handler.GenerateNewConnectionId(); var c = new RakNetConnection(raknetGuid, cid, peer, OnRequestClose); _connections.TryAdd(raknetGuid.g, c); return c; }
public RakNetGUID GetHost() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.TM_World_GetHost(swigCPtr), true); return(ret); }
public static uint ToUint32(RakNetGUID g) { uint ret = RakNetPINVOKE.RakNetGUID_ToUint32(RakNetGUID.getCPtr(g)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool RemoveFromWaitList(int eventId, RakNetGUID guid) { bool ret = RakNetPINVOKE.ReadyEvent_RemoveFromWaitList(swigCPtr, eventId, RakNetGUID.getCPtr(guid)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool Equals(RakNetGUID right) { bool ret = RakNetPINVOKE.RakNetGUID_Equals(swigCPtr, RakNetGUID.getCPtr(right)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public RakNetGUID GetFromWaitListAtIndex(int eventId, uint index) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.ReadyEvent_GetFromWaitListAtIndex(swigCPtr, eventId, index), true); return(ret); }
internal static HandleRef getCPtr(RakNetGUID obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
public ReadyEventSystemStatus GetReadyStatus(int eventId, RakNetGUID guid) { ReadyEventSystemStatus ret = (ReadyEventSystemStatus)RakNetPINVOKE.ReadyEvent_GetReadyStatus(swigCPtr, eventId, RakNetGUID.getCPtr(guid)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual void GetVerifiedJoinRequiredProcessingList(RakNetGUID host, RakNetListSystemAddress addresses, RakNetListRakNetGUID guids) { RakNetPINVOKE.FullyConnectedMesh2_GetVerifiedJoinRequiredProcessingList(swigCPtr, RakNetGUID.getCPtr(host), RakNetListSystemAddress.getCPtr(addresses), RakNetListRakNetGUID.getCPtr(guids)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public override RakNetGUID GetGUIDFromIndex(int index) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeer_GetGUIDFromIndex(swigCPtr, index), true); return(ret); }
public virtual void StartVerifiedJoin(RakNetGUID client) { RakNetPINVOKE.FullyConnectedMesh2_StartVerifiedJoin(swigCPtr, RakNetGUID.getCPtr(client)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public uint GetConnectionRequestIndex(RakNetGUID endpointGuid) { uint ret = RakNetPINVOKE.CSharp_Router2_GetConnectionRequestIndex(swigCPtr, RakNetGUID.getCPtr(endpointGuid)); if (RakNetPINVOKE.SWIGPendingException.Pending) { throw RakNetPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual RakNetGUID GetGUIDFromIndex(uint index) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeerInterface_GetGUIDFromIndex(swigCPtr, index), true); return ret; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RakNetGUID obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public virtual RakNetGUID GetGuidFromSystemAddress(SystemAddress input) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeerInterface_GetGuidFromSystemAddress(swigCPtr, SystemAddress.getCPtr(input)), false); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public RakNetGUID Get(uint position) { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakNetListRakNetGUID_Get(swigCPtr, position), false); return ret; }
public virtual void ChangeSystemAddress(RakNetGUID guid, SystemAddress systemAddress) { RakNetPINVOKE.RakPeerInterface_ChangeSystemAddress(swigCPtr, RakNetGUID.getCPtr(guid), SystemAddress.getCPtr(systemAddress)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public virtual void OnForwardingInProgress(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddress, RakNetGUID targetGuid, UDPProxyClient proxyClientPlugin) { RakNetPINVOKE.UDPProxyClientResultHandler_OnForwardingInProgress(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddress), RakNetGUID.getCPtr(targetGuid), UDPProxyClient.getCPtr(proxyClientPlugin)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public void AddParticipant(RakNetGUID rakNetGuid) { RakNetPINVOKE.FullyConnectedMesh2_AddParticipant(swigCPtr, RakNetGUID.getCPtr(rakNetGuid)); if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve(); }
public override RakNetGUID GetMyGUID() { RakNetGUID ret = new RakNetGUID(RakNetPINVOKE.RakPeer_GetMyGUID(swigCPtr), true); return(ret); }