SimulationManager.SetNetworkProtocolPortExemptionsAsync Method

Exempts a list of ports from simulation.

Syntax

public:
static IAsyncAction^ SetNetworkProtocolPortExemptionsAsync(
         SimulationManagerNetworkProtocol protocol,
         IVectorView<int32>^ ports
)  

Parameters

protocol
Type: SimulationManagerNetworkProtocol 

The protocol family of the ports being exempted.

ports
Type: IVectorView<int32> 

  The list of ports being exempted.

Return value

Type: IAsyncAction 

Returns an IAsyncAction object that represents the state of the asynchronous operation.

Remarks

This method must be called before starting a simulation for the listed ports to be exempted from the simulation.

Example

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)

);  

Requirements

Namespace: Microsoft.Xbox.Tools.ConsoleExtensions

Metadata: microsoft.xbox.tools.consoleextensions.winmd

See also

Reference

SimulationManager Class

SimulationManager Members

Microsoft.Xbox.Tools.ConsoleExtensions Namespace