Reputation: 181
I need to start multiple ports on the Server parallely and all the server sockets should block on socket.accept().
The same Thread needs to then start the client sockets (many) to connect to particular ServerSocket(s).
Can this be achieved?
Upvotes: 0
Views: 216
Reputation: 13515
No - you cannot "start multiple ports" - because ports can be used/binded, but not started.
"server sockets should block on socket.accept()" - sockets cannot block, only threads can.
"The same Thread needs to then start the client sockets" - sockets are open and closed, not started.
Upvotes: 1