Communicating with Remote Servers through the HTTP Protocol

Up until now we have focused on how to work with socket programming that passes arbitrary data between a client and a host by using either TCP or UDP packets. In either case we have invented our own protocol for communication. For example, the managed chat application used a protocol where ChatPacket objects were serialized into bytes and sent through the network connection. Our simple Remote Hello and UDPHello examples simply sent strings back and forth. In each of these cases, the client and the host both knew what to expect to come down the wire at any given time. As developers, we are free to design our protocols and set those expectations as we see fit.

While this approach provides ...

Get Microsoft® .NET Compact Framework Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.