How to use named pipes in PHP between different functions or even different processes without fork?

后端 未结 3 1513
一向
一向 2021-01-13 14:34

I want to write an Ajax web application, a game to be specific. Two web clients have to communicate with each other via the PHP server. My approach to solve this is to use A

3条回答
  •  一整个雨季
    2021-01-13 15:21

    Im not sure wether I understand your 2nd last post..

    But to comment on the last one, if I don't misunderstand, TCP might be even more complex because you will have to establish a connection before you can either read or write, so youve got different overhead

    As for the pipehandle closing at the function end, I assume you'll face the same problem with the sockets; but the pipefile remains!

    Persistent storage (files,db) would make the clients independent timingwise, if you want to use blocking calls then files might actually be a way to go..

提交回复
热议问题