C# Class NWebREST.Web.WebServer

Simple multithreaded webserver for Netduino. Lets user register endpoints that can be called on the server. When the server receives a valid command, it fires the EndPointReceived event with details stored in the EndPoinEventArgs parameter. Modifications By: Kjetil Seim Haugen Contact: [email protected] Latest revision: sometime 2016 Modifications By: Anton Kropp Contact: [email protected] Latest revision: 28 november 2012 Original Author: Jasper Schuurmans Contact: [email protected] Latest revision: 06 april 2011
Show file Open project: blinemedical/NWebREST Class Usage Examples

Private Properties

Property Type Description
GetApiList string
GetStylings string
InterpretRequest EndPoint
ListInterfaces void
PingLed void
SendResponse void
StartServer void
WriteBytes void

Public Methods

Method Description
RegisterEndPoint ( EndPoint endPoint ) : void
Start ( ) : void

Initialize the multithreaded server.

WebServer ( int port, bool enableLedStatus = true ) : System

Instantiates a new webserver.

Private Methods

Method Description
GetApiList ( ) : string
GetStylings ( ) : string
InterpretRequest ( string rawData ) : EndPoint

Parses a raw web request and filters out the command and arguments.

ListInterfaces ( ) : void
PingLed ( ) : void
SendResponse ( string response, Socket connection ) : void
StartServer ( ) : void

Starts the server.

WriteBytes ( byte bytes, Socket connection ) : void

Method Details

RegisterEndPoint() public method

public RegisterEndPoint ( EndPoint endPoint ) : void
endPoint EndPoint
return void

Start() public method

Initialize the multithreaded server.
public Start ( ) : void
return void

WebServer() public method

Instantiates a new webserver.
public WebServer ( int port, bool enableLedStatus = true ) : System
port int Port number to listen on.
enableLedStatus bool
return System