开发者

is it possible to transfer data between two clients using a php webserver?

I'm going to develop a game where there are multiple clients and they have to know state of each other, I though it would be nice if I could use my current php webserver to do the job but I'm not sure if it's capable of such a task. server should be able to do these jobs:

  • A client should be able to connect to server and keep that connection until game ends.
  • Server should be able to force some data into clients. I mean clients doesn't ask for data it's server that sends them.
  • Server doesn't need to do any special job on the data client give it. It just need to broadcast data to other clients
  • It doesn't matter if I have to use HTTP protocol to start the connection but I need to use raw data format for my actual game 开发者_运维知识库data transfer.

and these are some optional features that will greatly improve my server/client features:

  • Server should be able to verify all the data it is transferring. (I'm sure this is just like running another game on server)
  • Client should be able to create a UDP connection to server. since server is only streaming data it would be nice if clients could skip latency caused by TCP checkings.

Now with these options is there anyway to create a php (I'm not familiar with other technologies out there but if it helps I can learn) web service or should I build my own server from the scratch?

side note: clients are developed using either Obj-C or C++. 'm just wondering how I can develop my server.


I'd advice to use TCP persistent connexion. New Webbrowsers support it. See here to begin.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜