I created a Websocket server based on websocket-sharp, with two behaviors, ex:
- ws://host/behavior1
- ws://host/behavior2
From JavaScript, when I open a connection to the WebSocket Server, I need to specify the URL of the behavior that will accept my message. How can I call behavior2 when I connect on the url of behavior1 without having to create a new websocket connection? Is this possible?
At this point I am considering creating one behavior that will parse my message and redirect to the appropriate message handler.
Is there any reason to use multiple behaviors beside logical division? Any reason to use this logical division even if it forces to create a new connection?