<mx:SocketDescription> Element

Parameters for a SecureDeviceSocketDescription object to instantiate.

If this optional element exists, it must have an AllowedUsages child element.

Syntax

<mx:SocketDescription
  Name = string
  SecureIpProtocol = string
  BoundPort = string >
</mx:SocketDescription>  

Attributes

Name

The name string for the SecureDeviceSocketDescription object, corresponding to the result returned by Name. Must be unique among all SocketDescription nodes. Cannot be an empty string.

SecureIpProtocol

The name of the SecureIpProtocol enumeration value to use, corresponding to the result returned by IpProtocol. Valid values are “Udp” and “Tcp”.

BoundPort

The port number or range of port numbers to which the socket will be bound, corresponding to the range that includes BoundPortRangeUpper, BoundPortRangeLower, and the ports between. Valid numbers for each value are between 0-65535, inclusive. A range of port numbers is specified with the format LowPortNumber-HightPortNumber, for example 27000-27010. You may not specify the reserved port numbers.

After you have specified a range of ports, the use of those ports is denied to all other running apps on the console. So, you should specify a range that is adequate for your app’s your needs without making the range so large that other apps are overly limited in port availability. Do not specify overlapping ranges.

Note For communication based on secure sockets between consoles, shared apps cannot use ephemeral ports (that is, BoundPort cannot be zero). Shared apps must use static ports by specifying a valid non-zero port number. Ephemeral ports are also known as dynamic ports.

Element information

Parent elements mx:SocketDescriptions
Child elements mx:AllowedUsages

Example

<mx:Extension Category="windows.xbox.networking">
  <mx:XboxNetworkingManifest>
    <mx:SocketDescriptions>
      <mx:SocketDescription Name="MultiplayerSocketUdp" SecureIpProtocol="Udp" BoundPort="8700">
        <mx:AllowedUsages>
          <mx:SecureDeviceSocketUsage Type="Initiate" />
          <!-- connection will send initial packet -->
          <mx:SecureDeviceSocketUsage Type="Accept" />
          <!-- connection will accept packets -->
          <mx:SecureDeviceSocketUsage Type="SendGameData" />
          <!-- connection will send game data packets (UDP) -->
          <mx:SecureDeviceSocketUsage Type="ReceiveGameData" />
          <!-- connection will receive game data packets (UDP) -->
        </mx:AllowedUsages>
      </mx:SocketDescription>
    </mx:SocketDescriptions>
    <mx:SecureDeviceAssociationTemplates>
      <mx:SecureDeviceAssociationTemplate Name="MultiplayerUdp" InitiatorSocketDescription="MultiplayerSocketUdp" AcceptorSocketDescription="MultiplayerSocketUdp" MultiplayerSessionRequirement="Required">
        <mx:AllowedUsages>
          <mx:SecureDeviceAssociationUsage Type="InitiateFromMicrosoftConsole" />
          <mx:SecureDeviceAssociationUsage Type="AcceptOnMicrosoftConsole" />          
        </mx:AllowedUsages>
      </mx:SecureDeviceAssociationTemplate>
    </mx:SecureDeviceAssociationTemplates>
  </mx:XboxNetworkingManifest>
</mx:Extension>  

See also

Specifying the Secure Device Association Templates for your App

Networking