Xbox One supports a number of networking technologies that you can use in your title. These technologies have different strengths, and you will probably use a combination of technologies in your work, using the appropriate technology for each of the different kinds of communications you’re performing. In this topic, we’ll review the main networking technologies, with an eye toward helping you choose which networking technology to apply in a given situation.
Xbox One supports use of the Windows Socket (Winsock) API over designated sockets or socket ranges, using your choice of TCP or UDP. However, Xbox One requires that you specify the characteristics of every socket you use in the XboxNetworkingManifest node within your app manifest. These descriptions are used by the Xbox One system software to ensure that apps share network resources effectively and securely.
Note that only Winsock communications require you to specify secure socket connection information. If you communicate with a server using HTTPS or WebSockets, you do not need to add anything to the manifest for those activities.
See Introduction to Winsock on Xbox One for more details.
Xbox One gives you the ability to send and receive HTTP requests and responses.
Your code can make authenticated HTTP calls by including authentication tokens in the HTTP headers. Calls made to Xbox Live services automatically include the necessary tokens to authenticate with those services. If you want to communicate with your own or third party web services, you need to perform some additional configuration in your title package and in the web service, in order to be able to create valid authentication tokens for those services and have them recognized at the server.
In order to help protect the integrity of your title’s network communications, Xbox One encrypts HTTP traffic using SSL/TLS.
This release includes support for HTTPS client operations using IXMLHTTPRequest2. Your code should use IXMLHTTPRequest2 for HTTPS client operations. IXMLHTTPRequest2 automatically inserts authentication token and signature into HTTPS requests. Alternatively, you can manually retrieve tokens using the GetTokenAndSignatureAsync API, and then insert the token and signature into your HTTPS request yourself. Automatic token insertion is strongly recommended, though.
You can only access endpoints on Xbox Live or listed in the NSAL. If you use the NSAL, you must include the NSAL for your app as part of your app package.
See Starting HTTP on Xbox One for more details.
With WebSockets, you can send and receive data over a full-duplex connection that is tunneled through an existing HTTPS connection.
This release includes support for the WebSocket protocol—the web technology that enables establishing a bidirectional, full-duplex communications channel with a web server. WebSocket support is implemented through the same Windows.Networking.Sockets namespace members you would use in Windows 8, but note that only the parts of that namespace that implement WebSocket are available. If you are using sockets for any application other than WebSocket implementation, those parts of Windows.Networking.Sockets are not supported in this release, and you should continue to use Winsock.
Note that since WebSockets are implemented on top of HTTP, Xbox One encrypts WebSockets traffic using SSL/TLS, just as it encrypts all HTTP traffic.
See WebSockets for more details.
No matter how you combine these technologies in your work, sooner or later you will want to see what the traffic you’re sending over the network looks like. Network monitoring tools are essential to understanding and troubleshooting networking issues.
Xbox Live Services API Reference