Note that there are some explanatory texts on larger screens.

plurals
  1. USbob-the-destroyer
    primarykey
    data
    text
    plurals
    1. COJust found out the main `while(1)` loop is not necessary. `stream_socket_accept()` timeout can be set to -1 (never). Doing that may be better to capture any other types of errors that function may spit out (if it even has more internal error cases defined). All in all you gave insight into the fact that I specifically have to wait until the client finishes sending me their full request, rather than just processing whatever I'm given right away. Maybe I should read more deeply into http specs first to know how to handle them. I'll mark this accepted if no one else responds soon. Thanks!
      singulars
    2. COAlso, it looks like this works for GET requests since the header section seems to end with [line feed][Carriage return]. But, no reliable character pattern is returned on POST requests with post data just below that. I'm stuck figuring out how the client can tell me when their request message is complete.
      singulars
    3. COCool. Much better. For some reason, I was thinking `stream_get_contents()` actually waited until the full request was received. I guess the client didn't have time to send, being shoved out when the next `while($conn = ...` came and overwrote the connection. It looks like the `while( !preg_match...` loop stalls and blocks other connections if the client is slow or intentionally aborted. Should I fork off the process at that point or do you know of a better way?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload