public void Create_Success() { // NOTE: the '0' below will cause the TcpListener to bind to an anonymous port. TcpListener listener = new TcpListener(IPAddress.IPv6Any, 0); listener.Server.DualMode = true; listener.Start(); listener.Stop(); }