New cf-websocket-gateway Released

I've released a new version of cf-websocket-gateway which allows for targeted messaging. In the first release, messages were sent to all connected WebSocket clients. With this release you can now send messages to a single client or sets of clients. For more information see the github wiki.

I've also upload three sample applications that show how to use the WebSocket gateway with Flash fallback for browsers that do not support WebSockets. The examples are available in the v.1.1 download.

Related Blog Entries

tclaremont's Gravatar This looks like what I am after, but I am having trouble. Can I get this to work with a magnetic stripe reader on my network? Working through the example I have things set up according to your instructions in the CF administrator and all appears to be well. But when a scan occurs, nothing happens. It logs successfully through telnet, so I know the scanner is doing its job. I just need CF to "listen" for activity on the scanner and then log the transaction into a database. Can you help? Thanks!
# Posted By tclaremont | 9/22/10 3:43 PM
Nathan Mische's Gravatar @tclaremont - WebSockets are meant for real time communication in web applications. I'm afraid I can't help you with your magnetic stripe reader.
# Posted By Nathan Mische | 9/22/10 3:52 PM
johans's Gravatar Nice work Nathan - got it working following your instructions (just need to remember to restart CF after adding jar).

The chat examples works perfectly, however the private chat example does not work in MSIE but works fine in Chrome and Firefox. Any ideas on where the problem may be?
# Posted By johans | 9/23/10 9:50 PM
Nathan Mische's Gravatar @johans - I'm on a Mac so I haven't tested on MSIE. One thing you may try is changing the WEB_SOCKET_DEBUG flag to false in index.html.
# Posted By Nathan Mische | 9/23/10 10:03 PM
johans's Gravatar Sorry for my slow reply - I had already tried the debug flag = false as it was the only obvious "settings" difference between chat and private chat examples but no luck.

MSIE connects as it receives message but does not display the "..joined chat" message. It appears as "UNREGISTERED" in the drop list. On disconnect "UNREGISTERED left the chat." is displayed by other browsers.
# Posted By johans | 9/26/10 2:53 PM
johans's Gravatar Same problem with Opera - expect it is the Flash gateway. So the issue seems to be around WebSocketDemo.sendMessage("connect",username); where the connection is established with the user name.
# Posted By johans | 9/26/10 4:40 PM
johans's Gravatar Problem is that "connect" does not reset the ID from the initial "UNREGISTERED" value.

BTW - in application.cfc you have typos: onApplicaitonStart and applicaiton.userRegistry (..cait... should be ...cati...) - do not think that afects app anyway.
# Posted By johans | 9/26/10 5:42 PM
johans's Gravatar FYI - I tested with Firefox 3.6.x which does not have native web socket support and it worked fine.
# Posted By johans | 9/27/10 12:28 AM
Nathan Mische's Gravatar @johans - Thanks for the updates. I'll try to find some time to look into this.
# Posted By Nathan Mische | 9/27/10 9:19 PM
johans's Gravatar Thanks Nathan - no urgency from my side, seems to be with the Flash WebSocket implementation rather than any of your code.
# Posted By johans | 9/27/10 9:57 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.