Generally, the server application sits on a fixed network port waiting for connections from client applications. The client application then connects to the server, at a known ip address, and at the known port... I say "generally", because it is reversed with some protocols.
Since I don't know how your server was written, I will just assume that it uses the ServerSocket class. In this case,
you should not use the ServerSocket class class, you should used the Socket class.
Define a Socket with the IP address and port of your server. Establish a connection via the connect() method. Get the input and output streams, via the getInputStream() and getOutputStream() methods. And use those streams to read and write to the server.
Henry