From f8b09c194fe20192c4ac45697e9d0f00e8a96c2c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 29 Jan 2011 09:26:22 +0100 Subject: protocol: support client-to-client communication --- doc/protocol.xml | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) (limited to 'doc/protocol.xml') diff --git a/doc/protocol.xml b/doc/protocol.xml index a02a94e3..cf4de27c 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -204,6 +204,19 @@ has been modified. + + + subscription: a client + has subscribed or unsubscribed to a channel + + + + + message: a message was + received on a channel this client is subscribed to; + this event is only emitted when the queue is empty + + While a client is waiting for idle @@ -1676,5 +1689,105 @@ suffix: mpc + +
+ Client to client + + + Clients can communicate with each others over "channels". A + channel is created by a client subscribing to it. More than + one client can be subscribed to a channel at a time; all of + them will receive the messages which get sent to it. + + + + Each time a client subscribes or unsubscribes, the global idle + event subscription is generated. In + conjunction with the channels command, this + may be used to auto-detect clients providing additional + services. + + + + A new messages is indicated by the message + idle event. + + + + + + + subscribe + NAME + + + + + Subscribe to a channel. The channel is created if it + does not exist already. The name may consist of + alphanumeric ASCII characters plus underscore, dash, dot + and colon. + + + + + + + + unsubscribe + NAME + + + + + Unsubscribe from a channel. + + + + + + + + channels + + + + + Obtain a list of all channels. The response is a list + of "channel:" lines. + + + + + + + + readmessages + + + + + Reads messages for this client. The response is a list + of "channel:" and "message:" lines. + + + + + + + + sendmessage + CHANNEL + TEXT + + + + + Send a message to the specified channel. + + + + +
-- cgit v1.2.3