Lines Matching refs:inetAddress

95      * Connects socket 'fd' to 'inetAddress' on 'port', with no timeout. The lack of a timeout
98 public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketException {
100 return IoBridge.connect(fd, inetAddress, port, 0);
107 * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'.
110 public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException {
112 return connectErrno(fd, inetAddress, port, timeoutMs);
114 throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException);
124 private static boolean connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws ErrnoException, IOException {
127 Libcore.os.connect(fd, inetAddress, port);
144 Libcore.os.connect(fd, inetAddress, port);
159 throw new SocketTimeoutException(connectDetail(inetAddress, port, timeoutMs, null));
161 } while (!IoBridge.isConnected(fd, inetAddress, port, timeoutMs, remainingTimeoutMs));
166 private static String connectDetail(InetAddress inetAddress, int port, int timeoutMs, ErrnoException cause) {
167 String detail = "failed to connect to " + inetAddress + " (port " + port + ")";
194 public static boolean isConnected(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs, int remainingTimeoutMs) throws IOException {
219 String detail = connectDetail(inetAddress, port, timeoutMs, cause);
459 public static int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws IOException {
460 boolean isDatagram = (inetAddress != null);
466 result = Libcore.os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
473 public static int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws IOException {
474 boolean isDatagram = (inetAddress != null);
480 result = Libcore.os.sendto(fd, buffer, flags, inetAddress, port);