Sockets, infinite looping
This isn't a problem, just an inquiry. I originally tried this:
PHP Code:
|
Re: Sockets, infinite looping
If you make an infinite loop, you're going to hang the server.
Just call once and it will return after socket change or timeout. Use a task to call repeatedly |
Re: Sockets, infinite looping
Quote:
I'm not asking if it creates an infinite loop, I'm asking why that would create an infinite loop as it's only supposed to return true if there's new data in the socket. |
Re: Sockets, infinite looping
It's checking if there's data waiting. But because your timeout is so large. It consently checks over and over. Until it times out (the server "locks up" but it's actually still checking)
|
Re: Sockets, infinite looping
If I lower the timeout, I don't get a response though. Weird.
|
| All times are GMT -4. The time now is 04:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.