コード例 #1
0
 public void Dispose()
 {
     m_Driver.Dispose();
 }
コード例 #2
0
 public void OnDestroy()
 {
     m_Driver.Dispose();
     m_Connections.Dispose();
 }
コード例 #3
0
 public void OnDestroy() //done
 {
     m_Driver.Dispose();
 }
コード例 #4
0
 public void Dispose()
 {
     m_LocalDriver.Dispose();
     m_LocalData.Dispose();
 }
コード例 #5
0
 public void IPC_TearDown()
 {
     Driver.Dispose();
     RemoteDriver.Dispose();
 }
コード例 #6
0
 public void OnDestroy()
 {
     //Disconnect();
     m_Driver.Dispose();
 }
 public void Stop()
 {
     m_isConnected = false;
     m_Connection.Disconnect(m_Driver);
     m_Driver.Dispose();
 }
コード例 #8
0
 public void OnDestroy()
 {
     m_Driver.Dispose();
     m_Connections.Dispose();
     clientList.Clear();
 }
コード例 #9
0
 public void OnDestroy()
 {
     m_Driver.Dispose();
     m_NetworkPlayers.Clear();
     m_Connections.Dispose();
 }
コード例 #10
0
 public void OnDestroy()
 {
     //LogoutScript.instance.Logout();
     m_Driver.Dispose();
 }
コード例 #11
0
 void OnDestroy()
 {
     m_ClientDriver.Dispose();
 }
コード例 #12
0
 public void IPC_TearDown()
 {
     m_ClientDriver.Dispose();
     m_ServerDriver.Dispose();
 }
 public void Stop()
 {
     m_Driver.Dispose();
     m_Connections.Dispose();
 }
コード例 #14
0
ファイル: SoakServer.cs プロジェクト: za10222/multiplayer
 public void Dispose()
 {
     m_UpdateHandle.Complete();
     m_ServerDriver.Dispose();
     m_Connections.Dispose();
 }
コード例 #15
0
    private void OnDestroy()
    {
        m_Driver.Dispose();

        UnregisterMessageHandlerClasses();
    }
コード例 #16
0
 void OnDestroy()
 {
     Driver.Dispose();
 }
コード例 #17
0
 private void OnDestroy()
 {
     driver.Dispose();
     connections.Dispose();
 }
コード例 #18
0
 void OnDestroy()
 {
     m_ServerDriver.Dispose();
     m_connections.Dispose();
 }
コード例 #19
0
 public virtual void Shutdown()
 {
     driver.Dispose();
     connections.Dispose();
 }
コード例 #20
0
    private void OnDestroy()
    {
        networkJobHandle.Complete();

        networkDriver.Dispose();
    }
コード例 #21
0
 private void OnDestroy()
 {
     // Dispose of unmanaged memory
     Driver.Dispose();
     connections.Dispose();
 }
コード例 #22
0
 void OnDestroy()
 {
     ServerJobHandle.Complete();
     m_Connections.Dispose();
     m_Driver.Dispose();
 }
コード例 #23
0
 public void Dispose()
 {
     networkJobHandle.Complete();
     networkDriver.Dispose();
 }
コード例 #24
0
 private void OnDestroy()
 {
     driver.Dispose();
 }
コード例 #25
0
 public void OnDestroy()
 {
     Debug.Log("[Notice] Cleaning up network driver...");
     m_Driver.Dispose();
 }
コード例 #26
0
 private void OnDestroy()
 {
     networkDriver.Dispose();
     connections.Dispose();
 }
コード例 #27
0
 public void OnDestroy()
 {
     m_Driver.Dispose();
 }
コード例 #28
0
        public IEnumerator ServerAnd5Clients_Connect_Successfully()
        {
            int numberOfClients = 5;
            NativeArray <NetworkConnection> connectionToClientArray;

            NetworkDriver[] client_driversArray = new NetworkDriver[numberOfClients];
            NativeArray <NetworkConnection> clientToServerConnectionsArray;

            //setup server
            connectionToClientArray = new NativeArray <NetworkConnection>(numberOfClients, Allocator.Persistent);
            server_driver           = NetworkDriver.Create(new NetworkDataStreamParameter {
                size = 0
            });
            NetworkEndPoint server_endpoint = NetworkEndPoint.LoopbackIpv4;

            server_endpoint.Port = 1337;
            server_driver.Bind(server_endpoint);
            server_driver.Listen();

            //setup clients
            clientToServerConnectionsArray = new NativeArray <NetworkConnection>(numberOfClients, Allocator.Persistent);

            for (int i = 0; i < numberOfClients; i++)
            {
                client_driversArray[i] = NetworkDriver.Create(new NetworkDataStreamParameter {
                    size = 0
                });
                clientToServerConnectionsArray[i] = client_driversArray[i].Connect(server_endpoint);
            }

            //update drivers
            for (int i = 0; i < numberOfClients; i++)
            {
                client_driversArray[i].ScheduleUpdate().Complete();
            }
            server_driver.ScheduleUpdate().Complete();

            //accept connections
            for (int i = 0; i < numberOfClients; i++)
            {
                connectionToClientArray[i] = server_driver.Accept();
                ev = PollDriverAndFindDataEvent(ref server_driver, connectionToClientArray[i], NetworkEvent.Type.Empty);
                Assert.IsTrue(ev == NetworkEvent.Type.Empty, "Not empty NetworkEvent on the server appeared");
                ev = PollDriverAndFindDataEvent(ref client_driversArray[i], clientToServerConnectionsArray[i], NetworkEvent.Type.Connect);
                Assert.IsTrue(ev == NetworkEvent.Type.Connect, "NetworkEvent should have Type.Connect on the client");
            }
            //close connections
            for (int i = 0; i < numberOfClients; i++)
            {
                clientToServerConnectionsArray[i].Close(client_driversArray[i]);

                //update drivers
                client_driversArray[i].ScheduleUpdate().Complete();
                ev = PollDriverAndFindDataEvent(ref server_driver, connectionToClientArray[i], NetworkEvent.Type.Disconnect);
                Assert.IsTrue(ev == NetworkEvent.Type.Disconnect, "NetworkEvent.Type.Disconnect was expected to appear, but " + ev + " appeared");
            }

            server_driver.Dispose();
            for (int i = 0; i < numberOfClients; i++)
            {
                client_driversArray[i].Dispose();
            }
            connectionToClientArray.Dispose();
            clientToServerConnectionsArray.Dispose();

            yield return(null);
        }
コード例 #29
0
 public void OnDestroy()
 {
     localDriver.Dispose();
 }
コード例 #30
0
 public static void StopServer()
 {
     Driver.Dispose();
     Console.Log("Stopped server.");
 }