doctor can see patients who logged on before

This commit is contained in:
shinichi
2020-10-16 15:02:19 +02:00
parent 6fb9d0efaa
commit fd9b321292
4 changed files with 15 additions and 90 deletions

View File

@@ -26,8 +26,9 @@ namespace Server
this.mDoctor = value;
this.clients.ForEach((client) =>
{
var dinges = DataParser.getNewConnectionJson(client.username);
Debug.WriteLine("foreach " + Encoding.ASCII.GetString(dinges));
Debug.WriteLine("foreach called for " + client.username);
byte[] dinges = DataParser.getNewConnectionJson(client.username);
Debug.WriteLine("foreach " + Encoding.ASCII.GetString(dinges.Skip(5).ToArray()));
this.mDoctor.sendMessage(dinges);
});
}
@@ -63,7 +64,8 @@ namespace Server
public void NewLogin(Client client)
{
clients.Add(client);
this.clients.Add(client);
Debug.WriteLine("amount of clients is now " + this.clients.Count);
var dinges = DataParser.getNewConnectionJson(client.username);
Debug.WriteLine("new login" + Encoding.ASCII.GetString(dinges));
Doctor?.sendMessage(dinges);