1

How do you wait for data when using nonblocking sockets in PHP?

Everything works fine up until I need to read data from the socket, that's where I need to properly wait for the data. I'm not exactly sure on how I would check if data is there to be read.

1 Answer 1

3

If PHP has nonblocking sockets, it should have select.

socket_select looks like the right thing to use.

Sign up to request clarification or add additional context in comments.

2 Comments

Ahh, yeah. Totally forgot about that method. That's what I needed. Thank you.
What about the code for this non-blocking socket example?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.