dongzi1959
2014-08-14 20:03
浏览 41
已采纳

PHP fsockopen与HTML5中的WebSockets有何不同? [关闭]

Is it only the server side vs. client side?

Can you have an instant message sent via PHP's fsockopen or am I limited due to polling with Javascript on the other side, the client?

图片转代码服务由CSDN问答提供 功能建议

它只是服务器端还是客户端?

你能来吗? 有一个通过PHP的fsockopen发送的即时消息,或者由于在另一端使用Javascript进行轮询,我是否受到限制?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • douxi0098 2014-08-14 20:19
    最佳回答

    fsockopen creates the "normal" system sockets and thus can be used to connect to mail servers etc. WebSockets look similar at first but they are bidirectional data transfer encapsulated inside a HTTP(S) connection. This means, that you cannot use them to directly connect to mail servers etc. Instead you would need to have a WebSocket peer which forwards the data to plain sockets.

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题