Two Sockets so that a serve two different task simultaneously without threading to the same client
Asked
Active
Viewed 121 times
-2
-
Possible duplicate of [Can i create multiple sockets in java?](https://stackoverflow.com/questions/48076760/can-i-create-multiple-sockets-in-java) – chb Apr 03 '18 at 15:21
-
Yes it is possible. – FilipRistic Apr 03 '18 at 15:22
1 Answers
0
Yes. Typically, they would use different local ports to access the same server. If you want to do that without threads, you should use SocketChannel and configure it for non-blocking IO. However, non-blocking IO is more complicated to use.

Steve11235
- 2,849
- 1
- 17
- 18