mirror of
https://github.com/corda/corda.git
synced 2025-01-09 14:33:30 +00:00
47d9039b69
gethostbyname may return any combination of IPv4 and IPv6 addresses, and it's not safe to assume the first address is IPv4, which is all our code is currently prepared to handle. In contrast, getaddrinfo allows us to specify whether we want IPv4, IPv6, or both. We should eventually make this switch on Windows as well, but the status of getaddrinfo in Windows 2000 is not clear, and MinGW's ws2tcpip.h only declares it for XP and above. This commit also adds InetAddress.getByName for explicit DNS lookups.
20 lines
556 B
Java
20 lines
556 B
Java
/* Copyright (c) 2008, Avian Contributors
|
|
|
|
Permission to use, copy, modify, and/or distribute this software
|
|
for any purpose with or without fee is hereby granted, provided
|
|
that the above copyright notice and this permission notice appear
|
|
in all copies.
|
|
|
|
There is NO WARRANTY for this software. See license.txt for
|
|
details. */
|
|
|
|
package java.net;
|
|
|
|
import java.io.IOException;
|
|
|
|
public abstract class Socket {
|
|
public static native void init() throws IOException;
|
|
|
|
public abstract void setTcpNoDelay(boolean on) throws SocketException;
|
|
}
|