andremussche/DelphiWebsockets

Send Messages from Server to Client(s)

GitHubDelphi opened this issue · 2 comments

My use case is to push messages (based on events) from the server to one or more clients directly - without the need for a client request.

What is the preferred way of accomplishing this behaviour?

MCSTN commented

Any clues on WS_Server.SocketIO.EmitEventTo() usage to emit to single client?
I do understand usage of WS_Server.SocketIO.EmitEventToAll() but can't figure out the .EmitEventTo() usage.
Guessing AContext parameter is used to specify the client to send to but how? I'm lost. Anybody?