简体   繁体   中英

Meteor WebSockets (via DDP?)

I'm working on a simple game, that needs to use Web Sockets. I have read that DDP should be the way to go, as it's what Meteor uses.

I can't find any documentation regarding it tho, except the note on Meteor.com .

Should I use sock js instead, or how can I use the DDP package?

DDP is a protocol that can run on top of sockets. It's not a socket library in itself. If you really need your own socket communication, then use socket.io or look for packages that do that on atmosphere. There have been some attempts made (eg, http://arunoda.github.io/meteor-streams/ ), but I'm not sure what the latest is on that. This might work for you: https://github.com/joncursi/socket-io-client

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM