K
K
Kirill Zhilyaev2018-03-05 11:32:07
Java
Kirill Zhilyaev, 2018-03-05 11:32:07

How to bind several programs to one port?

I am using DataGramSocket. There are 2 applications that are listening on the same port. Both need to be able to bind to the same port. How to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-03-05
@sergey-gornostaev

If Java 9 is running and the program is running on a nix system, both applications must have the SO_REUSEPORT parameter set on the socket .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question