0

I'm working on a multiplayer game that sends a lot of data over sockets, and using the meteor stack.

What is the best way to hook into DDP to send/receive events, and act on them yourself? or should i try and mix normal websocket events in?

Checking the DDP spec here RPC is supported from client to server, but I don't see the other way around. From server to client is Added/Updated/Removed collections type messages. I guess i could just use one of these, but is there a lower level for sending your own message types? eg If I want to send different types of messages ("playerMove") from the server to the clients, what might be a way to do that?

If I could pub/sub to a channel, and send my own msgs back and forth that get mapped to client events / methods that would save more infra/plumbing in the app.

Pointers/code snippets appreciated!

reference: - DDP spec - Android DDP client

4

1 回答 1

0

也许最初来自 arunoda 的流包可能有用。看起来这里有一个 0.9 兼容的分支:https ://atmospherejs.com/lepozepo/streams

于 2014-09-20T02:47:03.733 回答