Hi,

thanks for the response.

Nicolas Trani wrote:
Hi,

if you want to make a user join a channel use this :

http://www.ape-project.org/docs/server/users/user.join.html
but I can't create a user from SSJS, right? so where do I get the user from, if I connect from jsonrpc, I can't do
  var u = new user();
  u.join('mychannel');
At least it gives me an error, and in libape-spidermonkey.c there is no user class defined, unfortunately.


And IRApeclient.sendCmd is just an IRC client in SSJS, a demo ;)
yeah, right, I understand... just, I haven't found a suitable example for what I'm trying to do, and the irc client seemed to be the closest match on the provided examples.

The interim solution I have now is a hook on send command, but that doesn't seem to me a very good solution.

Thanks
Stefan


Regards.

Stefan Sayer a écrit :
Hello,

I'm writing a json-rpc 2.0/netstrings/tcp server in ape JSJS, and I would like to write a function with which the client can subscribe to a channel, and then every time something is posted into that channel, a notification is sent over the json-rpc connection.

Now, how do I join a channel in JSJS, so that I get a callback when something is posted into that channel?

I have found the ircserver.js, but there it looks like APE JSJS in IRCApeclient.sendCmd creates a new connection to itself to port 6969 and posts messages through that connection. Which, I think, is pretty weird, and can really not be the solution; in the jsjs we are already in the server code space. Or is this the only method to interact with a channel from inside APE?

Thanks!
Stefan




--
Stefan Sayer
VoIP Services Consulting and Development

Warschauer Str. 24
10243 Berlin

tel:+491621366449
sip:[email protected]
email/xmpp:[email protected]


--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to