pgadapter
pgadapter copied to clipboard
chore: refactor ProxyServer to use channels instead of sockets
Refactors the ProxyServer to use the SocketChannel interfaces instead of Sockets. This makes the sockets replaceable for the new Unix domain socket implementation in Java16, which again means that we can conditionally load that when we know that we have Java16 or higher as the target language.
Also adds a Maven profile for building a .jar that can be used for a native image. This profile loads a Socket factory that uses the default Java Unix domain sockets implementation instead of a third-party dependency that requires a native library.