コード例 #1
0
 public void OnDestroy()
 {
     ServerJobHandle.Complete();
     Connections.Dispose();
     Driver.Dispose();
     Players.Dispose();
 }
コード例 #2
0
    public void OnDestroy()
    {
        m_Connection.Disconnect(m_Driver);
        m_Connection = default(NetworkConnection);

        m_Driver.Dispose();
    }
コード例 #3
0
 public void OnDestroy()
 {
     // Make sure we run our jobs to completion before exiting.
     ServerJobHandle.Complete();
     m_Connections.Dispose();
     m_Driver.Dispose();
 }
コード例 #4
0
 private void disposeUnmanagedMemory()
 {
     if (networkDriver.IsCreated)
     {
         networkDriver.Dispose();
     }
 }
 public void OnDestroy()
 {
     ClientJobHandle.Complete();
     m_Connection.Dispose();
     m_Driver.Dispose();
     m_Done.Dispose();
 }
コード例 #6
0
 public void OnDestroy()
 {
     m_Connection.Disconnect(m_Driver);
     m_Done = true;
     m_Driver.Dispose();
     //m_Connection.Dispose();
 }
コード例 #7
0
 void OnDestroy()
 {
     if (m_ClientDriver.IsCreated)
     {
         m_ClientDriver.Dispose();
     }
 }
コード例 #8
0
 void OnDestroy()
 {
     // All jobs must be completed before we can dispose the data they use
     m_updateHandle.Complete();
     m_ServerDriver.Dispose();
     m_connections.Dispose();
 }
コード例 #9
0
 //OnDeestroy sicsonnect driver and dispose it
 public void OnDestroy()
 {
     if (m_Connection.IsCreated)
     {
         m_Connection.Disconnect(m_Driver);
     }
     m_Driver.Dispose();
 }
コード例 #10
0
 protected override void OnDestroyManager()
 {
     Debug.Log("client system on destroy manager");
     if (m_Driver.IsCreated)
     {
         m_Driver.Dispose();
     }
 }
コード例 #11
0
    private void OnDestroy()
    {
        ServerJobHandle.Complete();

        m_Driver.Dispose();
        m_Pipeline.Dispose();
        m_Connections.Dispose();
    }
コード例 #12
0
    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;
    }
コード例 #13
0
 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();
 }
コード例 #14
0
    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;
    }
コード例 #15
0
 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();
 }
コード例 #16
0
 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();
 }
コード例 #17
0
 public void Dispose()
 {
     UpdateHandle.Complete();
     DriverHandle.Dispose();
     ConnectionHandle.Dispose();
     PendingSoakMessages.Dispose();
     SoakClientStreamWriter.Dispose();
     SoakJobDataPacket.Dispose();
     SoakJobContextsHandle.Dispose();
     SoakStatisticsHandle.Dispose();
 }
コード例 #18
0
 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
     }
 }
コード例 #19
0
 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();
     }
 }
コード例 #20
0
        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();
        }
コード例 #21
0
        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;
        }
コード例 #22
0
        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);
            }
        }
コード例 #23
0
        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();
        }
コード例 #24
0
 void OnDestroy()
 {
     m_ClientDriver.Dispose();
     ServerEndPoint = default(NetworkEndPoint);
 }
コード例 #25
0
 private void OnDestroy()
 {
     m_Driver.Dispose();
     m_Connections.Dispose();
 }
コード例 #26
0
 public void OnDestroy()
 {
     //Disposes unmanaged memory
     networkDriver.Dispose();
     networkConnections.Dispose();
 }
コード例 #27
0
 public void OnDestroy()
 {
     m_Driver.Dispose();
     //m_Connections.Dispose();
 }
コード例 #28
0
 public void OnDestroy()
 {
     Driver.Dispose();
     Connections.Dispose();
 }
コード例 #29
0
 void OnDestroy()
 {
     m_ClientDriver.Dispose();
 }
コード例 #30
0
 public void OnDestroy()
 {
     Driver.Dispose();
 }