Hi,
I'm trying to do a test on my first socket tutorial.
So I have a socket_listen.php which has the following code:

while($connection = socket_accept($socket)) {
socket_write($connection,'You\'ve successfully connected to my computer!\r\n');
}

that was just part of it. And it works.
However, what puzzle me is that, the script will keep processing?
Is it suppose to be like that? Am I suppose to left the script running forever? Please enlighten me.

Thanks.

    Let me see your tutorial, I think you will have to leave it running.

      Yes, as a "socket server" the server must continue to run for it to process socket requests.

        Write a Reply...