UDP Address already in use?

后端 未结 3 839
时光取名叫无心
时光取名叫无心 2021-01-13 14:04

I am following the UDP tutorials at http://docs.oracle.com/javase/tutorial/networking/datagrams/broadcasting.html ,I have copied all the code and compiled it, now If I compi

3条回答
  •  失恋的感觉
    2021-01-13 14:51

    This is likely because you are already running an instance of the server. Only one server can listen on a given port at a time. Check to see if you are already running an instance (if you are using Eclipse, you should see this in the command window) and terminate it before running another instance.

    Though it is also possible that a stream was not shut down properly. If you are running an IDE, restarting the IDE should fix the problem, though occasionally I have had to restart my computer. Probably a better solution to fix this, but that is what has worked for me.

提交回复
热议问题