Begins establishing a new secure device association using specific port numbers from a port range.
public:
IAsyncOperation<SecureDeviceAssociation^ >^ CreateAssociationForPortsAsync(
SecureDeviceAddress^ secureDeviceAddress,
CreateSecureDeviceAssociationBehavior behavior,
String^ initiatorPort,
String^ acceptorPort
)
secureDeviceAddress
Type: SecureDeviceAddress
A pointer to the SecureDeviceAddress to which to establish an association.
behavior
Type: CreateSecureDeviceAssociationBehavior
Flags describing how the SecureDeviceAssociation should be established.
initiatorPort
Type: String
A string specifying the number of the desired initiating port, from the range of initiator ports specified in this SecureDeviceAssociationTemplate.
acceptorPort
Type: String
A string specifying the number of the desired acceptor port, from the range of acceptor ports specified in this SecureDeviceAssociationTemplate.
Type: IAsyncOperation<SecureDeviceAssociation^ >
Returns an IAsyncOperation<TResult> object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncOperation<TResult>.Completed property. When the asynchronous operation is complete, the result of the operation can be retrieved by using the IAsyncOperation<TResult>.GetResults method.
The result of the asynchronous operation is a SecureDeviceAssociation object representing a logical connection between two Xbox LIVE authenticated consoles, or between a console and a server.
CreateAssociationForPortsAsync operates in a similar manner, and with similar requirements and constraints, as SecureDeviceAssociationTemplate.CreateAssociationAsync Method. Consult the documentation for that function understand the behavior of CreateAssociationForPortsAsync.
Namespace: Windows.Xbox.Networking
Metadata: windows.winmd
SecureDeviceAssociationTemplate Class