de.gesellix.docker.client.filesocket.FileSocket Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker-filesocket Show documentation
Show all versions of docker-filesocket Show documentation
Unix Domain Sockets and Named Pipes for the JVM on Linux, macOS, and Windows
The newest version!
package de.gesellix.docker.client.filesocket;
import java.net.InetAddress;
import java.net.Socket;
public abstract class FileSocket extends Socket {
public final static String SOCKET_MARKER = ".socket";
public String encodeHostname(String hostname) {
return new HostnameEncoder().encode(hostname) + SOCKET_MARKER;
}
public String decodeHostname(InetAddress address) {
String hostName = address.getHostName();
return new HostnameEncoder().decode(hostName.substring(0, hostName.indexOf(SOCKET_MARKER)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy