ChapterÂ 9.Â Hello Pachube (Sockets Version)
In this chapter, I will present a version of a complete Pachube client that uses the
Socket API. It demonstrates that this low-level API is a viable alternative, especially for âfire and forgetâ requests.
HelloPachubeSockets (ExampleÂ 9-1) performs some initializations in its
Main method, enters an endless loop in which it waits until it is time for the next measurement, performs the measurement, and then sends the result to Pachube. This is repeated every 20 seconds like in the original
using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; ...