it looks like you are doing your own websocket. web sockets are a persistent connection. when a controller action opens a web socket, that action does not return until the web socket is closed.
typically you would use a static collection tying a particular web socket connection to a an id associated with the client at the other end, if you scale out, then move the static collection to a database, and include the server key. (redis is typically used). then when you want to send a message to a client(s) you lookup in the database, and send a message to the server with the connection, and have the server send the message to the correct web socket. you can use a reshape or have additional web sockets between the servers for server to server communication.
if using signal/r as the hub, then in the action, in addition to a websocket to the client, you would open a connection to the hub. then the action's job is to relay messages between the hub and the client. if the client disconnects be sure to exit the hub.