How to send info from server to a specific client.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By djmick

So I have a server and client project and they can connect successfully, and in the client code it matches up two clients to each other, but I need to tell the clients that they are matched up from the server, however, it needs to go back to only the two specific clients that are matched up. Does anyone know how to send info from the server to a specific client, probably based on that clients id? Thanks

:bust_in_silhouette: Reply From: Wakatta

If you are not already storing all connected peers on the server you can use get_network_connected_peers() to get the IDs and use

rpc_id(<peer_id>,"function_name", <optional_args>)


rpc_unreliable_id(<peer_id>, "function_name", <optional_args>)

It is all very well documented here

You can even use rset and rconfig to change variables of specific peers

Wakatta | 2021-08-05 20:22