You can try the follwoing:
Socket client = new Socket();
client.connect(new InetSocketAddress(hostip, port_num), connection_time_out);
You can try the follwoing:
Socket client = new Socket();
client.connect(new InetSocketAddress(hostip, port_num), connection_time_out);