kohlschutter/junixsocket — reverse-engineered prompt
Reverse engineered prompt
Build me a Java library that lets regular Java apps talk over Unix domain sockets, not just TCP, and also support related socket families like VSOCK, TIPC, and the macOS system one where it makes sense. I want it to feel like normal Java networking, so both the classic socket APIs and NIO should work, with support for stream and datagram sockets. It should run on Java 8 and newer, include the native bridge pieces needed under the hood, and come with prebuilt native binaries for the common desktop and server platforms so it works out of the box for most people.
Please also include practical examples and demos, like a simple client and server, HTTP over Unix sockets, RMI over Unix sockets, and connecting to local MySQL and PostgreSQL through Unix socket files. Add support for useful low level features like peer credentials, passing file descriptors, abstract namespace on Linux, and socketpair. I also want a solid self test app people can run to verify their platform works. Keep it modular and well documented, and check current docs online if you need to.
Want more depth? Deep Reverse