public void OnDestroy() { ServerJobHandle.Complete(); Connections.Dispose(); Driver.Dispose(); Players.Dispose(); }
public void OnDestroy() { m_Connection.Disconnect(m_Driver); m_Connection = default(NetworkConnection); m_Driver.Dispose(); }
public void OnDestroy() { // Make sure we run our jobs to completion before exiting. ServerJobHandle.Complete(); m_Connections.Dispose(); m_Driver.Dispose(); }
private void disposeUnmanagedMemory() { if (networkDriver.IsCreated) { networkDriver.Dispose(); } }
public void OnDestroy() { ClientJobHandle.Complete(); m_Connection.Dispose(); m_Driver.Dispose(); m_Done.Dispose(); }
public void OnDestroy() { m_Connection.Disconnect(m_Driver); m_Done = true; m_Driver.Dispose(); //m_Connection.Dispose(); }
void OnDestroy() { if (m_ClientDriver.IsCreated) { m_ClientDriver.Dispose(); } }
void OnDestroy() { // All jobs must be completed before we can dispose the data they use m_updateHandle.Complete(); m_ServerDriver.Dispose(); m_connections.Dispose(); }
//OnDeestroy sicsonnect driver and dispose it public void OnDestroy() { if (m_Connection.IsCreated) { m_Connection.Disconnect(m_Driver); } m_Driver.Dispose(); }
protected override void OnDestroyManager() { Debug.Log("client system on destroy manager"); if (m_Driver.IsCreated) { m_Driver.Dispose(); } }
private void OnDestroy() { ServerJobHandle.Complete(); m_Driver.Dispose(); m_Pipeline.Dispose(); m_Connections.Dispose(); }
void OnDestroy() { // All jobs must be completed before we can dispose the data they use jobHandler.Complete(); m_ServerDriver.Dispose(); m_connections.Dispose(); pcc.PutPlayEvent -= PutPlayEventCallback; }
void OnDestroy() { // All jobs must be completed before we can dispose the data they use m_updateHandle.Complete(); m_ClientDriver.Dispose(); m_pendingPings.Dispose(); m_pingStats.Dispose(); m_clientToServerConnection.Dispose(); }
void OnDestroy() { // All jobs must be completed before we can dispose the data they use jobHandler.Complete(); m_ClientDriver.Disconnect(m_clientToServerConnection[0]); m_ClientDriver.Dispose(); m_clientToServerConnection.Dispose(); pcc.GetStateEvent -= GetStateEventCallback; pcc.GetResultsEvent -= GetResultsEventCallback; }
public void OnDestroy() { for (int i = 0; i < Connections.Length; i++) { m_DisconnectedPlayers.Add(m_Players[Connections[i].InternalId]); m_Players.Remove(Connections[i].InternalId); } SendDisconnectedPlayers(); m_Driver.Dispose(); Connections.Dispose(); }
public void OnDestroy() { for (int i = 0; i < m_Connections.Length; i++) { m_DisconnectedPlayers.Add(m_Players[m_Connections[i].InternalId]); m_Players.Remove(m_Connections[i].InternalId); } SendDisconnectedPlayers(); // Sends final message to all clients m_Driver.Dispose(); m_Connections.Dispose(); }
public void Dispose() { UpdateHandle.Complete(); DriverHandle.Dispose(); ConnectionHandle.Dispose(); PendingSoakMessages.Dispose(); SoakClientStreamWriter.Dispose(); SoakJobDataPacket.Dispose(); SoakJobContextsHandle.Dispose(); SoakStatisticsHandle.Dispose(); }
public void OnDestroy() { try { m_Driver.Dispose(); m_Connections.Dispose(); } catch { // Ignored as Unplaying Unity can throw errors here when driver is already destroyed and is harmless } }
protected override void OnDestroyManager() { // Destroy NetworkDrivers if the manager is destroyed with live entities Debug.Log("Server system on destroy"); if (m_Driver.IsCreated) { m_Driver.Dispose(); } if (currentId.IsCreated) { currentId.Dispose(); } }
public void DisconnectAndCleanup() { clientToServerConnection.Close(client_driver); //update drivers client_driver.ScheduleUpdate().Complete(); server_driver.ScheduleUpdate().Complete(); ev = server_driver.PopEventForConnection(connectionToClient, out stream); Assert.IsTrue(ev == NetworkEvent.Type.Disconnect, "NetworkEvent.Type.Disconnect was expected to appear, but " + ev + "appeared"); server_driver.Dispose(); client_driver.Dispose(); }
public void Dispose() { if (m_Disposed) { return; } // All jobs must be completed before we can dispose the data they use m_UpdateHandle.Complete(); m_ServerDriver.Dispose(); m_Connections.Dispose(); m_ShouldShutdownServer.Dispose(); m_SqpServer.Dispose(); m_Disposed = true; }
bool m_Disposed = false; // To detect redundant calls public void Dispose() { if (!m_Disposed) { //All jobs must be completed before we can dispose the data they use updateHandle.Complete(); // Dispose unmanaged resources m_ClientDriver.Dispose(); m_PendingPings.Dispose(); m_NumPings.Dispose(); m_LastPing.Dispose(); m_ClientToServerConnection.Dispose(); m_Disposed = true; GC.SuppressFinalize(this); } }
protected override void OnDestroy() { LastDriverWriter.Complete(); #if UNITY_EDITOR || DEVELOPMENT_BUILD m_NetStats.Dispose(); #endif numNetworkIds.Dispose(); freeNetworkIds.Dispose(); var driver = m_Driver; using (var networkStreamConnections = m_NetworkStreamConnectionQuery.ToComponentDataArray <NetworkStreamConnection>(Allocator.TempJob)) { foreach (var connection in networkStreamConnections) { driver.Disconnect(connection.Value); } } // TODO: can this be run without safety on the main thread? // Entities.ForEach((ref NetworkStreamConnection connection) => // { // driver.Disconnect(connection.Value); // }).Run(); m_Driver.Dispose(); }
void OnDestroy() { m_ClientDriver.Dispose(); ServerEndPoint = default(NetworkEndPoint); }
private void OnDestroy() { m_Driver.Dispose(); m_Connections.Dispose(); }
public void OnDestroy() { //Disposes unmanaged memory networkDriver.Dispose(); networkConnections.Dispose(); }
public void OnDestroy() { m_Driver.Dispose(); //m_Connections.Dispose(); }
public void OnDestroy() { Driver.Dispose(); Connections.Dispose(); }
void OnDestroy() { m_ClientDriver.Dispose(); }
public void OnDestroy() { Driver.Dispose(); }