public void Connect_ShouldConnectToHost()
        {
            // Given
            const string hostAddress = "127.0.0.1";

            // When
            _connectToNewGame.Connect(hostAddress);

            // Then
            _spotTheDefuserNetworkManager.Received().Join(hostAddress);
        }
示例#2
0
        private void OnDiscoveryAccepted(IPEndPoint ipEndPoint, string text)
        {
            if (!_listeningForHost)
            {
                return;
            }

            Debug.Log($"Discovery request accepted: {ipEndPoint}");
            _listeningForHost = false;
            _connectToNewGame.Connect(ipEndPoint.Address.ToString());
            StopDiscovery();
        }