spray-socketio icon indicating copy to clipboard operation
spray-socketio copied to clipboard

How to publish a message in a certain channel (namespace)

Open santiagopoli opened this issue 10 years ago • 0 comments

Hi! I need to implement a Web Server which receives a message via HTTP POST and forwards it via socket.io. For example:

POST http://localhost:8080/c1
Body: {"message":"Hello World"}

I want then, to send the message {"message":"Hello World"} to the c1 channel via socket.io (if someone is connected to the socket must receive that message).

The HTTP part is done: I can receive a POST request and intercept both the body and the URI, but then I want to connect to a certain namespace via socket.io and forward the message.

Thanks in advance!

santiagopoli avatar Feb 02 '15 19:02 santiagopoli