Sujeet Suman

Sujeet Suman

  • 388
  • 4.1k
  • 1.5m

Closing socket object not releasing port no in C#.

Nov 19 2018 5:02 AM
Hi Friends,
I need your help. 
I am iterating over all local network interfaces(network adapter) to bind socket object. I am following below process:
 
(01.)  Creating socket object.
(02.)  Iterating over network interfaces & binding socket object.
(03.)  Using socket to send data on network.
(04.)  Closing socket object.
 
But here I am getting SocketException during binding at 2nd iteration. 
If any one having any idea or solution, then please share here. 
 

Answers (2)