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

php 5.3 and gameq #2

Closed
giovannimatina opened this issue May 21, 2011 · 2 comments
Closed

php 5.3 and gameq #2

giovannimatina opened this issue May 21, 2011 · 2 comments
Labels
Bug This request does fix a bug. v1 v2

Comments

@giovannimatina
Copy link

Hi, i'm using the latest version of gameq, but it's running on php 5.3, some time ago in another hosting (with php 5.2) it work perfectly, but now my new hosting have only php 5.3 and some functions, as stream_socket_client(), and other updated with 5.3, sometimes give this error: PHP Warning: stream_socket_client(): failed to bind to '0:10002', system said: Address already in use in /home/*****/Austinb-GameQ/GameQ/Communicate.php on line 119. There are any updates for solve this problem? What you think?

@Austinb
Copy link
Owner

Austinb commented May 25, 2011

Which version are you using?

The issue is part of the socket system binding for responses. The way the code works, I did not write this part, is that each server and its query calls are sent out all at once and the sockets are bound to ports locally to recieve the response from the queried servers. The issue is that the there is no logic in v1 of GameQ (nor is there any in v2 at this time) to check and make sure that the socket can be bound.

I will see if I can update the v1 code without too much work. I will add, if possible, some checks in the v2 to be smarter when binding for responses.

Check on and add available port check. Dont blindly try to attach to ports, check first.

@Austinb
Copy link
Owner

Austinb commented Jun 1, 2011

To update I was wrong about what the context was used for. It is actually to specify the outbound ip:port for connections. Removing it should just make the system pick available outbound ports on its own. Seems to work fine in v2.

The actual issue with the warning is probably a change from PHP 5.2 to 5.3 though I am unable to find a change log entry.

Austinb added a commit that referenced this issue Jun 1, 2011
@Austinb Austinb closed this as completed in 0087783 Jun 1, 2011
@devu4 devu4 mentioned this issue Oct 5, 2014
bumbummen99 pushed a commit that referenced this issue May 22, 2022
rostov114 added a commit to rostov114/GameQ that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This request does fix a bug. v1 v2
Projects
None yet
Development

No branches or pull requests

2 participants