简体   繁体   中英

Node js Websocket router

I am building a chat application for my company, and have decided to use node js with websocket (ws). In my application there are multiple department and users for each department, and when a browser (person asking question) selects a particular department, want the chat to be redirected to the same department.

I have decided to use a WAMP router, but there is no sample script which shows how to redirect each chat to the particular department a browser has selected.

Can anyone help me on the same

Cheers

Sunil

A user would select a department in the browser client. The client then subscribes to the topic/topics for that department. If it was previously subscribed to the topics for another department then it sends an unsubscribe for these.

The WAMP router then sends events for any of the subscribed topics to the client.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM