Most of the ColdFusion WebSocket responses are asynchronous, which essentially means that  the response to your WebSocket method calls (such as getSubscriberCount, getSubscriptions, publish, invokeAndPublish, or invoke) come to message handler.

Since there are different types of responses and all of them come to the message handler, application developer has to interpret each response, figure out the operation that triggered, and show the responses appropriately.

Let us try to crack  how to categorize the responses received.For more details checkout  my thrid entry on ColdFusion Websocket blog series 

-Evelin Varghese

5 Comments to “Interpreting ColdFusion WebSocket responses”

  1. Aaron Neff
    Hi Evelin,

    I see cfwebsocketChannel.js defines two more JavaScript functions:


    What does "targetId" and "target" mean? I tried an active clientID as well as the channel name. The calls always return true, yet no message is ever received at the handler side.

  2. Evelin Varghese
    Hi Aron,
    These functions are old names of publish and invokeandpublish. These are there by mistake and may not work.
    I will raise a bug to to remove it to avoid any confusion.
    Thanks for pointing this out.
  3. Aaron Neff
    Hi Evelin,

    AH that makes sense :) You're welcome and thanks for filing that.

    I noticed two more things:
    1) unsubscribe() invokes afterUnsubscribe() twice
    2) onClose receives an argument (the docs say "The function does not require any arguments.") in this format: {"appName":MyApp","cfauth":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","subscribeTo":"MyChannel","referrer":"/mypage.cfm"} (so, the behavior conflicts w/ the docs)

    I can create repro cases for both #1 & #2 and file them later today.

  4. Evelin Varghese
    Please do log bugs for these two issues with repro.We will investigate them for sure.
  5. Aaron Neff
    Hi Evelin,

    Done! #1 filed as bug #3345316 and #2 filed as ER #3345377.


Leave a Comment

Leave this field empty: