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

Unable to create socket #40

Open
nathanaelbaaij opened this issue Oct 21, 2014 · 2 comments
Open

Unable to create socket #40

nathanaelbaaij opened this issue Oct 21, 2014 · 2 comments

Comments

@nathanaelbaaij
Copy link

Connecting to irc.twitch.tv

I get this error can you help me out?

socket_create(): Unable to create socket [0]: An address incompatible with the requested protocol was used. in E:\xampp\htdocs\github\IRC-Bot\Classes\Library\IRC\Bot.php on line 195

log:

21.10.2014 - 19:36:50 [ COMMAND ] PASS password
21.10.2014 - 19:36:50 [ COMMAND ] NICK disputatio
21.10.2014 - 19:36:50 [ COMMAND ] USER disputatio Layne-Obserdia.de disputatio :disputatio
21.10.2014 - 19:36:50 [ LOG ] TEST: BEFORE SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] TEST: AFTER SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 001 disputatio :Welcome, GLHF!
21.10.2014 - 19:36:51 [ LOG ] TEST: BEFORE SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] TEST: AFTER SOCKET SELECT.
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 002 disputatio :Your host is tmi.twitch.tv
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 003 disputatio :This server is rather new
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 004 disputatio :-
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 375 disputatio :-
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 372 disputatio :You are in a maze of twisty passages, all alike.
21.10.2014 - 19:36:51 [ LOG ] :tmi.twitch.tv 376 disputatio :>
21.10.2014 - 19:36:51 [ LOG ] TEST: BEFORE SOCKET SELECT.

@ElvenSpellmaker
Copy link
Collaborator

I'm _really_ sorry for my late response, I've been far too busy and this issue is about my fork and so should be there and not here. ^^

My Fork is a multi-process version which needs two PHP processes running (wildbot.php and PWorkhorse.php to get the bot up and running, this is what the socketName => 'bot.socket' is for. It's a socket name which both sides will try to communicate on.
My version reduces CPU load by using a socket_select and also reduces the chance of PINGing out due to a slow command, as the front end is free to service requests while the back end works on a request.

My version also has a lot of other nice features not found in the main version here, such as the ability to kill the back end and reload it to install new plug-ins, patch bugs, etc., without having to make the bot leave the channel.

The version on my Multi-Process branch is still very in test (hence the TEST lines everywhere in the output above). It's usable though and I have a bot running 24/7 using the Multi-Process code on freenode.

I should really get around to updating my Multi-Process branch and readme, but work is really taking its toll at the moment. I only pushed the Multi-Process branch as a friend wanted to see my progress with making it multi-process, it was never ready for shipping as such but it works quite well.

NOW, getting to your question, my fork communicates from front to back end via a UNIX socket only at the moment rendering it Linux/Mac only or Windows with Cygwin using Cygwin's PHP.
The error you are receiving is because it's trying to create a UNIX socket on Windows, which doesn't natively exist.

I'm sorry for the problems this causes and in future I should make it use an HTTP socket if it fails to bind over the UNIX socket for Windows without Cygwin.

@nathanaelbaaij
Copy link
Author

Thank you for your respond, to be fair I was also really busy. I would love to see this project growing, but that is up to you. Sorry for my bad English.

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

No branches or pull requests

2 participants