Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unblock Socket socket = server.accept();  RSS feed

 
glen croteau
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Is it possible to unblock a Socket which has blocked on accept().
In my experiments I have been able to accomplish this by implementing setSoTimeout and testing a condition. however i would rather find an event driven solution.

I have tried setting the socket to null with no effect.

Any suggestion please.

Thanks
 
glen croteau
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved.

socket.close() from another thread.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!