How do I fix the error “Only one usage of each socket address (protocol/network address/port) is normally permitted”?

前端 未结 3 2050
慢半拍i
慢半拍i 2020-12-28 12:40

I\'ve done a lot of googling but not had much luck with my issues. I am new to network programming and trying to learn, I\'ve attempted to set up a simple server & clien

相关标签:
3条回答
  • 2020-12-28 12:55

    You are debugging two or more times. so the application may run more at a time. Then only this issue will occur. You should close all debugging applications using task-manager, Then debug again.

    0 讨论(0)
  • 2020-12-28 13:01

    I faced similar problem on windows server 2012 STD 64 bit , my problem is resolved after updating windows with all available windows updates.

    0 讨论(0)
  • 2020-12-28 13:04

    ListenForClients is getting invoked twice (on two different threads) - once from the constructor, once from the explicit method call in Main. When two instances of the TcpListener try to listen on the same port, you get that error.

    0 讨论(0)
提交回复
热议问题