Search code examples
node.jswebsocketautobahncrossbar

Using 2 different client to route chat messages using ws and WAMP router


I am building a chat support application for my company, I am using node js, websocket and WAMP router to do the same, there is 2 different clients (html). One for customers to send request and one for support to respond to the same.

I am confused at the start of the same, how to transfer message between 2 different html clients. If there is any example could someone help me on this.

I have got single html client working fine but not on 2 html client, how to transmit chat messages.

Thanks in advance

Sunil


Solution

  • With WAMP on a conceptual level you don't transfer messages between clients, but you send messages to a topic and subscribers to the topic receive these. So your first HTML client publishes to a topic and the second HTML client receives these if its subscribed to this topic.