Exempts a list of ports from simulation.
public:
static IAsyncAction^ SetNetworkProtocolPortExemptionsAsync(
SimulationManagerNetworkProtocol protocol,
IVectorView<int32>^ ports
)
protocol
Type: SimulationManagerNetworkProtocol
The protocol family of the ports being exempted.
ports
Type: IVectorView<int32>
The list of ports being exempted.
Type: IAsyncAction
Returns an IAsyncAction object that represents the state of the asynchronous operation.
This method must be called before starting a simulation for the listed ports to be exempted from the simulation.
var XtfSimulationManager = Microsoft.Xbox.Tools.ConsoleExtensions.SimulationManager;
var tcpPorts = [5000, 5001]
XtfSimulationManager.setNetworkProtocolPortExemptionsAsync(Microsoft.Xbox.Tools.ConsoleExtensions.NetworkProtocol.tcp, tcpPorts).then(
function complete() {
// Handle success here
writeLog("SimulationManager.setNetworkProtocolPortExemptionsAsync succeeded");
}.bind(this),
function error(e) {
// Handle error here
writeError("SimulationManager.setNetworkProtocolPortExemptionsAsync error: ", e);
}.bind(this)
);
Namespace: Microsoft.Xbox.Tools.ConsoleExtensions
Metadata: microsoft.xbox.tools.consoleextensions.winmd