You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case of a chat server, all the users (clients) are connecting to my server (host) and websocket.connect and receive and disconnect work wonderfully, because my server is managing all the connections.
But what about the case when my server (as a client) would like to make a websocket connection to another server (as host), like it would for a Slack Bot? For example, if I implement a Slack Bot, I'd like to connect to Slack and use consumers to manage messages that Slack sends over the websocket connection. Slack would host the websocket and my app would connect as a client.
I've tried this, but when I establish a connection to Slack, the websocket.connect event does not execute. Further, once I'm connected to Slack and Slack sends a message to all connected clients, websocket.receive does not fire.
Am I implementing something incorrectly? Can my server connect to other servers through a websocket connection and have consumers manage the messages as they are added to the websocket connection?
Would love to know how you'd implement something like this using this.
The text was updated successfully, but these errors were encountered:
You can't do outgoing websockets with the current protocol server, it's incoming only - a new protocol server would be needed to be written to support outgoing, with a new spec (things like messages saying what to connect to).
As for Slack itself, I would like to see a higher-level Slack protocol server that lets consumers be written against slack-specific channel names (like slack.userjoin or slack.message).
In the case of a chat server, all the users (clients) are connecting to my server (host) and websocket.connect and receive and disconnect work wonderfully, because my server is managing all the connections.
But what about the case when my server (as a client) would like to make a websocket connection to another server (as host), like it would for a Slack Bot? For example, if I implement a Slack Bot, I'd like to connect to Slack and use consumers to manage messages that Slack sends over the websocket connection. Slack would host the websocket and my app would connect as a client.
I've tried this, but when I establish a connection to Slack, the websocket.connect event does not execute. Further, once I'm connected to Slack and Slack sends a message to all connected clients, websocket.receive does not fire.
Am I implementing something incorrectly? Can my server connect to other servers through a websocket connection and have consumers manage the messages as they are added to the websocket connection?
Would love to know how you'd implement something like this using this.
The text was updated successfully, but these errors were encountered: