Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Network.connectionTesterPort

static var connectionTesterPort: int;
static int connectionTesterPort;
static connectionTesterPort as int

Description

The port of the connection tester used in Network.TestConnection.

	function ResetIP() {
		Network.connectionTesterIP = "127.0.0.1";
		Network.connectionTesterPort = 10000;
	}
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void ResetIP() {
        Network.connectionTesterIP = "127.0.0.1";
        Network.connectionTesterPort = 10000;
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def ResetIP() as void:
		Network.connectionTesterIP = '127.0.0.1'
		Network.connectionTesterPort = 10000