I'm re-posting this here, because the IRC channel is very quiet. I was thinking zmq would be an excellent protocol to build upon for a chat server, rather than implementing my own message framing etc. My thought was that a client would connect to a REQ/REP channel to authenticate and be given a session ID (and to send events), then connect to a PUB/SUB channel and subscribe to its session ID to receive private events and to well-known IDs for broadcast events. However, the more I look at the documentation, the more this seems invalid: it seems that a client could simply subscribe to *all* messages, thereby receiving private messages intended for other clients.
I could have the authentication cause a new, dedicated PUB socket to be created, and give its port number in the response, but that would lead to a race condition where someone else could connect as soon as it was opened. What would be the correct way to do this? What I want is to be able to: - Client-initiated requests, such as authentication, 'who is on?', 'user info' etc. - Client->server events (mostly 'user typed something') - Server->client events from various entities within the server, some public, some private _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
