SocketClient Sample

Windows Automotive 5.0/5.5

This sample demonstrates the following:

  • Creating a socket and using it to issue a request to retrieve an HTML page for a web site. The source tagging for the HTML page is displayed in the debugger’s Output window.
  • Creating a socket that connects to a URL and port.
  • Converting a string to a UTF-8 byte array so that the bytes can be sent over the socket.
  • Reading data over the socket in chunks to build up the entire HTML page.
  • Safely stopping waiting for data if the server is taking too long to respond.

For information about running and exploring this sample, see the Readme.txt file in the directory under:

Documents\Microsoft .NET Micro Framework 4.1\Samples\

Community Additions