Socket.io: Connect from one server to another

后端 未结 6 1095
星月不相逢
星月不相逢 2020-12-16 15:36

I\'m trying to make a nodejs(socket.io) server to communicate with another one. So the client emits an event to the \'hub\' server and this server emits an event to some sec

6条回答
  •  遥遥无期
    2020-12-16 16:19

    For anyone looking to do this on a MeteorJS app, I created a new Meteor package joncursi:socket-io-client to solve this problem. Please see https://atmospherejs.com/joncursi/socket-io-client for more detail and example usage. Since I've bundled the NPM binaries into a package for you, you don't have to worry about installing NPM packages, declaring NPM.require() dependencies, etc. And best of all, you can deploy to .meteor.com without a hitch.

提交回复
热议问题