开发者

Non browser based websocket clients in PHP

I was looking at Kanaka's reply to a websockets question here.

If I want to write a native app in PHP to use a websocket based webservice, where do I start? Are there any client libraries available in PHP to write native linux clients? Basically, my server can work on a RESTful architecture for 90% of the time. However, th开发者_如何转开发ere is one reason for the server to alert the client, so REST won't work here. So I am wondering if websockets is an answer here for me as compared to periodic polling by client.


Why not write the 90% using normal REST and do the remaining part where notifications are sent to the client using web sockets?

Here is a github project that looks like it might be what you want https://github.com/nicokaiser/php-websocket

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜