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

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

报告相同问题?

悬赏问题

  • ¥15 plotBAPC画图出错
  • ¥30 关于#opencv#的问题:使用大疆无人机拍摄水稻田间图像,拼接成tif图片,用什么方法可以识别并框选出水稻作物行
  • ¥15 Python卡尔曼滤波融合
  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理