Closed Kritzefitz closed 7 years ago
Hello @Kritzefitz, thanks for the PR.
Assuming this all works (I have no way to test it right now), my only concern/question is whether "overloading" the port/relayport parameters is really appropriate here. Perhaps it would be better to create new params for the socket address(es)? I think it could avoid some confusion and make cleaner code. What do you think?
I can totally understand you concerns. I mostly overloaded the port option for this, because it was easier than introducing new options and Net::Server conveniently already takes UNIX sockets through the port option.
While the current solution works in simple development tests, I noticed (unfortunately after writing this PR) that my solution doesn't allow creating the socket with a specific owner and permissions, which makes it unsuitable for production environments. Unfortunately the Net::Server
's documentation isn't overly verbose regarding UNIX sockets, so I don't know if it supports creating them with specific permissions.
So overall I think the current PR should not be merged (yet).
I'll close this for now and re-open when I got my changes in a usable state.
Adds the ability to listen on and relay to UNIX sockets. They can be used by setting
--port
or--relayport
to the path of the socket suffixed by '|unix' .This fixes #11