UnityEngine.Networking.NetworkTransport.AddHostWrapperWithoutIp C# (CSharp) Method

AddHostWrapperWithoutIp() private method

private AddHostWrapperWithoutIp ( HostTopologyInternal topologyInt, int port, int minTimeout, int maxTimeout ) : int
topologyInt HostTopologyInternal
port int
minTimeout int
maxTimeout int
return int
        private static extern int AddHostWrapperWithoutIp(HostTopologyInternal topologyInt, int port, int minTimeout, int maxTimeout);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

コード例 #1
0
 /// <summary>
 ///   <para>Create a host (open socket) and configure them to simulate internet latency (works on editor and development build only).</para>
 /// </summary>
 /// <param name="topology">The host topology for this host.</param>
 /// <param name="minTimeout">Minimum simulated delay.</param>
 /// <param name="maxTimeout">Maximum simulated delay.</param>
 /// <param name="port">Bind to specific port, if 0 is selected the port will chosen by OS.</param>
 /// <param name="ip">Bind to specific IP address.</param>
 /// <returns>
 ///   <para>Returns host ID just created.</para>
 /// </returns>
 public static int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, [DefaultValue("0")] int port, [DefaultValue("null")] string ip)
 {
     if (topology == null)
     {
         throw new NullReferenceException("topology is not defined");
     }
     if (ip == null)
     {
         return(NetworkTransport.AddHostWrapperWithoutIp(new HostTopologyInternal(topology), port, minTimeout, maxTimeout));
     }
     return(NetworkTransport.AddHostWrapper(new HostTopologyInternal(topology), ip, port, minTimeout, maxTimeout));
 }
All Usage Examples Of UnityEngine.Networking.NetworkTransport::AddHostWrapperWithoutIp