mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
various refinements to network implementation
The main idea is to make DatagramChannel and *SocketChannel behave in a way that more closely matches the standard, e.g. allow binding sockets to addresses without necessarily listening on those addresses and accept null addresses where appropriate. It also avoids multiple redundant DNS lookups. This commit also implements CharBuffer and BindException, and adds the Readable interface.
This commit is contained in:
@ -62,9 +62,17 @@ public class InetAddress {
|
||||
(int)((addr[3] + 256) % 256);
|
||||
}
|
||||
|
||||
int getRawAddress() {
|
||||
public int getRawAddress() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
static native int ipv4AddressForName(String name);
|
||||
static native int ipv4AddressForName(String name) throws UnknownHostException;
|
||||
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof InetAddress && ((InetAddress) o).ip == ip;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user