FindRandomOpenPort() public static method

Finds a random open port.
public static FindRandomOpenPort ( ) : int
return int
示例#1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="T:Netty.NettyServer" /> class.
 /// </summary>
 /// <param name="physicalPath">The physical path to the website.</param>
 /// <param name="virtualPath">The virtual path the website runs on.</param>
 public NettyServer(string physicalPath, string virtualPath) :
     this(physicalPath, virtualPath, NetworkUtility.FindRandomOpenPort(), true)
 {
 }