views:

270

answers:

1

I have

<script type="text/javascript">
  function setupComet()
  {
    dojox.cometd.init("http://comet.domain.tld:8000");
    dojox.cometd.subscribe("/my/calendar", cometCallback);
  }

  dojo.addOnLoad(setupComet);

  function cometCallback (msg)
  {
    alert(msg.data);
  }

</script>

Orbited is replying (viewed with firebug):

<html>
  <head><title>404 - No Such Resource</title></head>
  <body>
    <h1>No Such Resource</h1>
    <p>No such child resource.</p>
  </body>
</html>

What I'm doing wrong?


What I'm trying to achieve:

Browser comes to page and subscribes to (read-only) channel. When browser sends POST data, PHP side will send data to database and then publish 'refresh' to that comet channel. Browser gets this and refreshes page.

/etc/orbited.cfg:

[global]
reactor=epoll
session.ping_interval = 40
session.ping_timeout = 30
user=orbited

[listen]
http://:8000

[static]

[access]
* -> localhost:8000
* -> dev.lan:80

[logging]
debug=STDERR,debug.log
info=STDERR,info.log
access=STDERR,info.log
warn=STDERR,error.log
error=STDERR,error.log

enabled.default=info,access,warn,error,debug
A: 

You are trying to use the cometd library with the Orbited server. These two things do not go together -- just use Orbited.js. It should work with all of your other dojo code just fine.