newTcpMd5Sigs() — netty Function Reference
Architecture documentation for the newTcpMd5Sigs() function in TcpMd5Util.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5940a575_dc34_e2c4_8786_b0f92e6de764["newTcpMd5Sigs()"] 9b256397_7b66_3f2f_bcfc_d85563e386ee["TcpMd5Util"] 5940a575_dc34_e2c4_8786_b0f92e6de764 -->|defined in| 9b256397_7b66_3f2f_bcfc_d85563e386ee style 5940a575_dc34_e2c4_8786_b0f92e6de764 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/TcpMd5Util.java lines 32–69
static Collection<InetAddress> newTcpMd5Sigs(AbstractEpollChannel channel, Collection<InetAddress> current,
Map<InetAddress, byte[]> newKeys) throws IOException {
checkNotNull(channel, "channel");
checkNotNull(current, "current");
checkNotNull(newKeys, "newKeys");
// Validate incoming values
for (Entry<InetAddress, byte[]> e : newKeys.entrySet()) {
final byte[] key = e.getValue();
checkNotNullWithIAE(e.getKey(), "e.getKey");
checkNonEmpty(key, e.getKey().toString());
if (key.length > Native.TCP_MD5SIG_MAXKEYLEN) {
throw new IllegalArgumentException("newKeys[" + e.getKey() +
"] has a key with invalid length; should not exceed the maximum length (" +
Native.TCP_MD5SIG_MAXKEYLEN + ')');
}
}
// Remove mappings not present in the new set.
for (InetAddress addr : current) {
if (!newKeys.containsKey(addr)) {
channel.socket.setTcpMd5Sig(addr, null);
}
}
if (newKeys.isEmpty()) {
return Collections.emptySet();
}
// Set new mappings and store addresses which we set.
final Collection<InetAddress> addresses = new ArrayList<InetAddress>(newKeys.size());
for (Entry<InetAddress, byte[]> e : newKeys.entrySet()) {
channel.socket.setTcpMd5Sig(e.getKey(), e.getValue());
addresses.add(e.getKey());
}
return addresses;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does newTcpMd5Sigs() do?
newTcpMd5Sigs() is a function in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/TcpMd5Util.java.
Where is newTcpMd5Sigs() defined?
newTcpMd5Sigs() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/TcpMd5Util.java at line 32.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free