C
C#3y ago
Matt

Tricky networking issue

This is less of a directly c# related question and more of a networking issue but I guess this is still a good place to ask. So I have two clients, each with a set of data. Let's say for simplicity that 2 clients have a data set of { 0, 0 } each. I want to alert client 2 if one of client 1's zeros flips to a one. So I have a function watching this byte array and when it changes, I send a message to a server with the updated byte array. This in turn sends a message to client 2 with the updated byte array and client 2 then applies the updated array. Everything is good so far. But then the issues begin. Because client 2 is also watching their own byte array and they've just seen that their byte array has been updated. This means client 2 will now send a message to the server with their updated byte array which then sends the array to client 1 and so on. Is there a way around this or am I missing something?
1 Reply
Kouhai
Kouhai3y ago
How are you observing the changes on the data set?
Want results from more Discord servers?
Add your server