I am working on multiplayer game and I cant to find out how can I connect other clients to the created game. I mean that client A create a socket connection to the server an
Here is one way to handle it. When a player wants to create a game, his copy of the application should open a ServerSocket on a known port - a port number that the application knows - and maybe display to the player the IP address that the socket was opened on.
Then when another player wants to join a game, she should enter that same IP address and her copy of the application should connect using a regular client Socket, the IP address entered, and the known port that the application knows.
Check the Socket and ServerSocket javadoc for details.