Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Being able to connect to a socket file #19

Open
noudAndi opened this issue Mar 23, 2017 · 6 comments
Open

Feature Request: Being able to connect to a socket file #19

noudAndi opened this issue Mar 23, 2017 · 6 comments
Labels

Comments

@noudAndi
Copy link

Hi,
it would be great to be able to connect to a socket file, e.g. /var/lib/php7.0-fpm/www.sock.

Do you think it is possible to implement this?

I'm no Perl Pro, but I did some ugly hacking, which is only a Proof of Concept, but it would work in general.

#    my $sock = IO::Socket::INET->new(
#        PeerAddr => $override_ip,
#        PeerPort => $o_port,
#    );
use IO::Socket::UNIX;
my $sock = IO::Socket::UNIX->new(
    Type => SOCK_STREAM,
    Peer => '/var/lib/php7.0-fpm/web3.sock',
);
@regilero
Copy link
Owner

Yes, that would quite certainly work. Is it Ok on your side? I mean using the FCGI::Client on this sock works?

Full feature would need an option to pass the socket path.

@noudAndi
Copy link
Author

Hi @regilero :

Thanks for replying. I've seen that @gvogets has already implemented this in a fork. Maybe you want to merge it back into your project.

gvogets@a283116

@regilero
Copy link
Owner

thanks for the research. I'll have a look.

@siklosipeter
Copy link

I implemented the very same functionality as @gvogets and wanted to post it here when I found this issue.

Please merge this feature into your plugin!

@kosli
Copy link

kosli commented May 21, 2018

I implemented something similiar before I saw this issue here. The version from @gvogets works like a charm. Plesae merge into into your plugin.

@magenbrot
Copy link
Contributor

damnit 😮 now about 3 people added support for UNIX sockets.. I saw this issue here too late and did that too.
@regilero you could simply merge my PR #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants