Searched refs:inetAddress (Results 1 - 12 of 12) sorted by relevance

/libcore/luni/src/main/native/
H A DNetworkUtilities.h26 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss);
33 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss);
H A DNetworkUtilities.cpp90 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss, bool map) { argument
93 if (inetAddress == NULL) {
100 ss->ss_family = env->GetIntField(inetAddress, familyFid);
114 ScopedLocalRef<jbyteArray> addressBytes(env, reinterpret_cast<jbyteArray>(env->GetObjectField(inetAddress, bytesFid)));
129 sin6->sin6_scope_id = env->GetIntField(inetAddress, scopeFid);
156 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss) { argument
157 return inetAddressToSockaddr(env, inetAddress, port, ss, false);
160 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage* ss) { argument
161 return inetAddressToSockaddr(env, inetAddress, port, ss, true);
H A Dlibcore_io_Posix.cpp222 jobject inetAddress = sockaddrToInetAddress(env, ss, &port); local
223 if (inetAddress == NULL) {
228 return env->NewObject(JniConstants::inetSocketAddressClass, ctor, inetAddress, port);
593 ScopedLocalRef<jobject> inetAddress(env, sockaddrToInetAddress(env, address, NULL));
594 if (inetAddress.get() == NULL) {
597 env->SetObjectArrayElement(result, index, inetAddress.get());
/libcore/luni/src/main/java/libcore/io/
H A DIoBridge.java95 * 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 { argument
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 { argument
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 { argument
127 Libcore.os.connect(fd, inetAddress, port);
138 Libcore.os.connect(fd, inetAddress, por
159 connectDetail(InetAddress inetAddress, int port, int timeoutMs, ErrnoException cause) argument
187 isConnected(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs, int remainingTimeoutMs) argument
456 sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument
470 sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) argument
[all...]
H A DBlockGuardOs.java167 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException { argument
169 return os.sendto(fd, buffer, flags, inetAddress, port);
172 @Override public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException { argument
174 if (inetAddress != null) {
177 return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
H A DPosix.java137 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException { argument
139 return sendtoBytes(fd, buffer, buffer.position(), buffer.remaining(), flags, inetAddress, port);
141 return sendtoBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining(), flags, inetAddress, port);
144 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException { argument
146 return sendtoBytes(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
148 private native int sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException; argument
H A DForwardingOs.java103 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException { return os.sendto(fd, buffer, flags, inetAddress, port); } argument
104 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException { return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); } argument
H A DOs.java95 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException; argument
96 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException; argument
/libcore/luni/src/test/java/libcore/java/net/
H A DOldDatagramSocketTest.java259 InetAddress inetAddress = InetAddress.getLocalHost();
261 ds.connect(inetAddress, portNumber);
263 inetAddress));
276 InetAddress inetAddress = InetAddress
279 ds.connect(inetAddress, portNumber);
281 inetAddress));
357 InetAddress inetAddress = InetAddress.getLocalHost();
359 ds.connect(inetAddress, portNumber);
427 InetAddress inetAddress = InetAddress.getLocalHost();
429 ds.connect(inetAddress, portNumbe
[all...]
H A DURLTest.java54 for (InetAddress inetAddress : InetAddress.getAllByName("localhost")) {
55 String address = inetAddress.getHostAddress();
56 if (inetAddress instanceof Inet6Address) {
/libcore/luni/src/main/java/java/net/
H A DInetAddress.java255 private static InetAddress disallowDeprecatedFormats(String address, InetAddress inetAddress) { argument
257 if (!(inetAddress instanceof Inet4Address) || address.indexOf(':') != -1) {
258 return inetAddress;
468 InetAddress inetAddress = parseNumericAddressNoThrow(address);
469 return inetAddress != null && disallowDeprecatedFormats(address, inetAddress) != null;
/libcore/luni/src/main/java/java/nio/
H A DSocketChannelImpl.java235 InetAddress inetAddress = connectAddress.getAddress();
237 finished = IoBridge.isConnected(fd, inetAddress, port, 0, 0); // Return immediately.

Completed in 70 milliseconds