Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22309

connect timeout

Newsgroups comp.lang.java.programmer
Date 2013-02-14 11:22 -0800
Message-ID <c45c592d-9d52-490b-b2d0-66eaaff38123@googlegroups.com> (permalink)
Subject connect timeout
From bob smith <bob@coolfone.comze.com>

Show all headers | View raw


Is there any way to specify the connection timeout for a java.net.Socket?

I might want something like this to throw a ConnectException within 10 seconds:

Socket socket = new Socket(ip_address, 80);

Thanks.

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

connect timeout bob smith <bob@coolfone.comze.com> - 2013-02-14 11:22 -0800
  Re: connect timeout Lew <lewbloch@gmail.com> - 2013-02-14 12:38 -0800
  Re: connect timeout Arne Vajhoej <arne@vajhoej.dk> - 2013-02-15 08:48 -0500
    Re: connect timeout Lew <lewbloch@gmail.com> - 2013-02-15 07:21 -0800
    Re: connect timeout mike7411@gmail.com - 2013-02-15 08:07 -0800
      Re: connect timeout Arne Vajhoej <arne@vajhoej.dk> - 2013-02-15 12:05 -0500
        Re: connect timeout "John B. Matthews" <nospam@nospam.invalid> - 2013-02-16 13:21 -0500

csiph-web