Search code examples
wampsharp

How to send a message to a client using WampSharp?


Is it possible to do this way: WampSharp client app connects to a WampSharp Server, then this server sends message/call client's function?


Solution

  • The client can subscribe to a topic and then you can publish to this topic, specifying in the publish options' eligible property the session id of the client.

    For functions this is more tricky - you would need to register the procedure with a unique name which depends on the client's session id and then call it from the server side.