I am trying to set the timeout of a connection on the client socket in java. I have set a default connect timeout to 2000, i.e:
this.socket.connect(this.soc
You can even try for :
Socket client=new Socket(); client.connect(new InetSocketAddress(hostip,port_num),connection_time_out);