On Thu, 2008-06-19 at 11:54 -0700, William "Chops" Westfield wrote: > On Jun 19, 2008, at 6:52 AM, Xiaofan Chen wrote: > > > I am trying to see if I can write some simple C based program > > to test the HTTP demo project from Microchip > > So you want a program that opens a tcp connection, sends some data, > receives the response, cleans up, and exits, without the "baggage" of > a whole web browser or email client, or telnet option negotiation, or > ANYTHING around it? > > That's ... tougher than you'd think it would be. I disagree. If you are talking just doing TCP it's pretty trivial. Google "berkeley sockets c example". The first hit is a very simple "echo" program. Pretty much any platform that has networking supports berkeley sockets. Now, if you are talking about emulating what a web browser does, it's a LITTLE more complicated, but not much. For server debug reasons I regularly connected to web servers by telnet and manually did the http protocol, it's not very hard (although it can get kinda obtuse...). That said, the easiest solution is probably like what you mention. "wget" is a very powerful program that can easily do what the op needs. TTYL -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist