duanmi4379 2015-02-04 03:37
浏览 54
已采纳

将MySQL更改推送/发送给客户端

The Goal:

What I am trying to do is when the MySQL database has changed send the changes to the clients currently connected.

I was thinking of trying to accomplish this using websockets however the only implementation I have seen of this is a client sends something to server and the server sends that to all the other clients.

What I am trying to do is the client connects to server (That's all the client has to do) then whenever the server has seen a change in the mysql database sends the changes to all the clients.

If websockets is the best solution could someone possibly explain how I would implement that? Or if there is a better way then websockets what is it?

  • 写回答

1条回答 默认 最新

  • douziqian2871 2015-07-23 13:05
    关注

    I found solution for that i can give you my code because i think websocket is the best way to do it easy. and Now,what I am trying to do is the client connects to server then whenever the server has seen a change in the MySQL database sends the changes to the specific clients(something like : save the id client get it from database in cookie then send it to the server to check the right client in order to show for him the new data).

    Check this link

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度