Hi,
thanks for the response.
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:sa...@iptel.org
email/
xmpp:stefan...@gmail.com