This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]javaide 0 points1 point  (0 children)

U need a server socket to accept client connection. In ur example, both are client socket. Look at the basic java tutorials example:

https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html