Microsoft reveals networking API improvements in Windows 10
Today, Microsoft has clearly explained the networking API improvements they made in their latest Windows 10 Operating System. Networking APIs are very important for any app because most of them are having connections to the internet. Microsoft has revealed that Windows 10’s networking team has invest dedicated effort in improving these networking APIs to enhance their speed and performance as well as capabilities and flexibility they offer to the developers.
Networking APIs in Universal Windows platform
Universal Windows Platform features large set of networking APIs that are targeted at different scenarios from querying the connectivity status of the device to connecting to peers and communicating with REST web services and downloading the large media files in the background. The following few are the subset of networking APIs.
- Windows.Networking.Sockets: Typically used in the P2P chat, VOIP and VPN apps.
- System.Net.Sockets: .NET version of sockets API that is widely used in the cross platform libraries and apps.
- WinSock: Used in cross-platform libraries like OpenSSL or multiplayer game libraries.
- Windows.Web.http and System.Net.http: Helpful to communicate with the REST web services.
- Windows.Networking.BackgroundTransfer: Crucial for uploading or downloading data even when the app is not in the foreground.
- Windows.Data.Json: Used to serialize/deserialize JSON content derved by webservices.
Above listed APIs represents different layers from socket at the lower layer, HTTP building on top of it. The background transfer and JSON APIs are more valuable in building on top of the HTTP.
New in Windows 10
Above listed APIs are enhanced in the Windows 10 OS for better performance and offer more flexibility to the developers. Let us have a look at network API improvements in Windows 10
- Socket Broker: Allow the apps to listen on Sockets even when app is not in foreground.
- Batched Sends: A new optimization in Sockets API implementation can send the data up to 4 times faster.
- HTTP/2: HTTP APIs now support faster version of the HTTP protocol for the Universal Windows Platform apps. This makes the REST webservice downloads and uploads 3 times faster.
- Post-processing in background transfer: Universal Windows Platform app now got the ability to handle the completion of their background downloads/uploads in the background task even before the app launched next time.