Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

What are the best practice to create a Netduino Server ?


  • Please log in to reply
3 replies to this topic

#1 Nicolas Dorier

Nicolas Dorier

    Member

  • Members
  • PipPip
  • 24 posts

Posted 23 February 2011 - 04:09 PM

I'd like my Netduino to be a server. However, it seems that the Socket class do not have asynchronous methods... Does it means that I need to keep a thread alive and Poll the socket ? I'm afraid that the processor will run for nothing... Do you have a better solution to save power and CPU usage ?

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 23 February 2011 - 06:15 PM

Hi Nicolas.
Take a look here:
http://forums.netdui...uino-webserver/
Very easy to start.
Cheers
Mario
Biggest fault of Netduino? It runs by electricity.

#3 Nicolas Dorier

Nicolas Dorier

    Member

  • Members
  • PipPip
  • 24 posts

Posted 23 February 2011 - 10:38 PM

thanks, my main concern was that the call was blocking, so I thought there would be a better way to save power and CPU resources.

#4 Fred

Fred

    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 23 February 2011 - 11:10 PM

I updated the web server code to be multi-threaded (well, double threaded) and posted here. The web listener runs on its own thread so doesn't block whatever else your code is doing.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.