Trying IceJS

Oscar.AcenaOscar.Acena Member Oscar AceñaOrganization: Universidad Castilla-La ManchaProject: Wireless sensor networks
Hi there!

I'm very excited about your announcement of IceJS. I tried it, but could not make it work. I've an example of IceWS using C++, and it works perfectly. But using a JS client, it throws the following error:
$ ./client.js 'printer1 -t -e 1.1:ws -h 127.0.0.1 -p 9090 -r /'
Ice::EndpointParseException
    ice_cause: "undefined"
    str: "invalid endpoint `ws -h 127.0.0.1 -p 9090' in `printer1 -t:ws -h 127.0.0.1 -p 9090'"

The error is produced by a stringToProxy call. I've tried some variations of the same endpoint:
  • 'printer1 -t -e 1.1:ws -h 127.0.0.1 -p 9090'
  • 'printer1 -t:ws -h 127.0.0.1 -p 9090'
  • 'printer1 -o:ws -h 127.0.0.1 -p 9090'

But the result is the same.

Any hint about what could be the problem?
I'm trying this with Ice3.5.1 installed on a Debian machine, and with IceJS-0.1.0 compiled from source.

Many thanks!

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Node.JS doesn't support the WS transport, only the TCP transport. See the JavaScript overview supported features for information on what is supported on Node.JS and web browser.

    So you'll need to change the "ws" in the endpoint with "tcp" and update your server configuration to use TCP as well.

    Cheers,
    Benoit.
Sign In or Register to comment.