How to send ext props to server and back

12 views
Skip to first unread message

Tao

unread,
Jan 19, 2011, 2:43:08 PM1/19/11
to aspComet
Hi

I am new to aspComet and play with the Chat demo. It's very nice.

One question I have is that the cometd.publish function.

/**
* Publishes a message on the given channel, containing the given
content.
* @param channel the channel to publish the message to
* @param content the content of the message
* @param publishProps an object to be merged with the publish
message
*/
this.publish = function(channel, content, publishProps)

In my client js code, I can call like this:

$.cometd.publish(channel, { sender: name, message: typingFlag + name +
' is typing...' }, { extpropname: 'usertype', extpropvalue: 'true' });

But how can I retrieve the publishProps object from the server side
and send it back to other chat clients.

Cheers,

Tao


Reply all
Reply to author
Forward
0 new messages