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

Socket.Accept


  • Please log in to reply
1 reply to this topic

#1 StefanUSMC

StefanUSMC

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationWisconsin, USA

Posted 01 May 2013 - 02:26 AM

Hello,

 

I am working with a project that requires that I be able to change the IP address of my ND+2 during runtime. I am running a HTTP server, on a separate thread. In order for the new IP to take, I need to be able to be able to completely close the instance of the server, and restart it. When I do this, I am getting a 10022 socket exception on my bind operation. From what I can see, this is caused by the old socket.accept sticking. I have tried closing this socket, setting it to null, setting my instance to null, aborting the thread and setting to null, explicitly designating the instance for garbage collection, and even a powerstate.reboot (both hard and soft). No matter what I do, I cannot seem to restart the server without that 10022 error.  If I unplug the ND and plug it back in, it will take the new settings no problem. Any idea where to go with this next?

 

Thanks,

Brandon



#2 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 01 May 2013 - 02:48 AM

mmm... restarting servers.  linger?

 

http://www.dotnetsol...og/linger-error

 

In your mention of things you tried to get rid of the socket you  didn't mention calling dispose() in some way, but I've got a lingering feeling that maybe the linger option might be closer to your problem.  but maybe not!  worth a look....






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.