Hello all,
This the HTTP server library version 2 that contains all functions that handles http web requests (GET /)(only), the server listens for connections on a separate thread hence not affecting the netduino main loop(multi task).
Changes from V.1:
1)Added a ServerConfig class
2)add a ServerCredential class used to authenticate and give security to the server
3)Overloaded the HttpServer constructor so that it takes a ServerCredential object
4)added an extra event named OnRequestReceived which provides the following arguments :
->IsInMemoryCard : boolean that indicates if file is MMC
->Request (byte array which is the original Request)
->FileName : requested filename extracted from the original request
5)added 2 public methods to the HttpServer class:
->send(filename) send the file from mmc
->send(byte[] data) send an array of bytes fragmented in 256 chuncks if greater that 256 bytes
7)optimized the speed
how to use the example:
1)pick a 2gb sd card and put files in it (html,pictures(jpeg,gif),flash pages(with its swf)
2)insert the sd card into netduino-plus
3)start visual studio 2010 express
4)open the example project
5)compile it and deploy to your netduino-plus board
6)open your browser and type in the ip address
7)the list of files in the sd card will appear as a link each, choose a file and it will reply with its contents.
note: you could import your own html files into sd card so that when clicked an html webpage will be displayed
note: the zipped file contains a documentation that provides help and description on the library
you could also visit my web page softelectrotech and download more libraries
watch this video demo