Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 WebSockets not working. Server=ColdFusion, Client=Delphi

I am coding a message distribution system. Server is ColdFusion (CF) 10, using the new <cfwebsocket> feature set. Client will be written in Delphi 2009.

If I write the client in ColdFusion (using the <cfwebsocket> tag) things work fine: I can send messages between two clients. So the server side appears to be working.

No such luck with a Delphi client. I've tried two component libraries so far (Delphi on Rails and sgcWebSockets). Both seem to establish a connection to the CF server, but messages are not sent or received. I'm fairly certain Delphi is making a connection to the server as no exceptions are thrown if I specify the correct address, whereas I get an exception if I specify a different port or URI.

I think the missing link is in my understanding of "channels". It's easy in CF: you specify the channel to subscribe to or send messages to and it works. But the concept of "channels" doesn't seem to exist much outside of ColdFusion. I've searched w3.org, Google, etc, and don't see much about channels in the HTML5 WebSocket specs. Some references, but nothing clear, especially in the examples.

In summary, my questions:

  1. Are "channels" part of the standard WebSocket API, and if so,
  2. How do I subscribe to a channel using one of the Delphi WebSocket libraries I mentioned? Shouldn't it be as easy as ws://[server]:[port]/[channel]?
  3. How to debug WebSocket connections & traffic on the CF server?

Many thanks. This is my first post on StackOverflow; apologies if it's a tad long.

like image 463
SetFreeByTruth Avatar asked Dec 13 '22 01:12

SetFreeByTruth


1 Answers

I using (or trying/investigating) this websocket implementation: http://code.google.com/p/bauglir-websocket/

I don't know ColdFusion, also the "channels" part is not what I know of websockets. Has CF a web client? Then you can debug it easily in Google Chrome

like image 99
André Avatar answered Dec 24 '22 02:12

André