search

Home  >  Q&A  >  body text

node.js - node 接收tcp数据后 如何推送给前端页面

通过node server端接收到tcp数据以后
想要在web页面显示出来
如果把tcp的数据推送给前端(使用socket.io)?

PHP中文网PHP中文网2867 days ago595

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-17 13:43:08

    If you want backend push, then WebSocket is a good way. In node, ws or socket.io is recommended. In addition, you can also consider foreground timing to pull data.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 13:43:08

    After the front-end and back-end have established sockets, they can communicate directly, and the data obtained is directly rendered on the front-end

    reply
    0
  • Cancelreply