Skip to main content Skip to main content Windows Experience Devices Windows Developer Microsoft Edge Windows Insider Microsoft 365 Microsoft 365 Azure Copilot Windows Surface XBOX Deals Small Business Support Windows Apps Outlook OneDrive Microsoft Teams OneNote Microsoft Edge Moving from Skype to Teams Computers Shop XBOX Accessories VR & mixed reality Certified Refurbished Trade-in for cash XBOX Game Pass Ultimate PC Game Pass XBOX games PC games Microsoft AI Microsoft Security Dynamics 365 Microsoft 365 for business Microsoft Power Platform Windows 365 Small Business Digital Sovereignty Azure Microsoft Developer Microsoft Learn Support for AI marketplace apps Microsoft Tech Community Microsoft Marketplace Software companies Visual Studio Microsoft Rewards Free downloads & security Education Gift cards Licensing Unlocked stories View Sitemap
November 21, 2013
PC

Network API cheat sheets available now in the download center

The network APIs have tremendous depth and enable your app to work in many ways.  But it can be hard to figure out how and when to use the different APIs.  To help you out, the Windows Networking Team has created poster-sized cheat sheets with overviews and code samples of the most popular network APIs.  And, we’re working on more!

The cheat sheets tell you about the different APIs. But which API is the right one to use, and when? Here’s an easy way to figure it out:

  • Are you connecting to an HTTP server?
  • Are you connected to a classic TCP or UDP server?  Or to Bluetooth? Use the Windows.Networking.StreamSocket (TCP and Bluetooth) or DatagramSocket (UDP and Multicast) classes.
  • Are you connecting to one of the new “WebSocket” servers?  They aren’t classic sockets (and don’t interoperate with classic sockets), but they can tunnel through corporate proxies and interoperate with up-to-date HTML5 browsers.  Websockets are in the Windows.Networking.Sockets namespace.
  • Are you connecting to people in the same room? (For example, with Near Field Communication (NFC) tap to connect)?  If so, use the Windows.Networking.Proximity PeerFinder and related classes; this can give you back a StreamSocket that you can use to communicate with peers.

Our first pack of cheat sheets are for the HttpClient, Sockets, and Background Transfer APIs.  Download the pack now from the Microsoft Download Center. And let us know what other cheat sheets you need!

–Peter Smith, Program Manager, Windows Networking Team

Your Privacy Choices Opt-Out Icon Your Privacy Choices
Consumer Health Privacy Sitemap Contact Microsoft Privacy Manage cookies Terms of use Trademarks Safety & eco Recycling About our ads