/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }
/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }
/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }
/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }
/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }
/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }
/** * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. * Use timeoutMs == 0 for a blocking connect with no timeout. */ public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { try { return connectErrno(fd, inetAddress, port, timeoutMs); } catch (ErrnoException errnoException) { throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); } catch (SocketException ex) { throw ex; // We don't want to doubly wrap these. } catch (SocketTimeoutException ex) { throw ex; // We don't want to doubly wrap these. } catch (IOException ex) { throw new SocketException(ex); } }