[ADDITION] Added databinding to the chatbox function.

Tried to broadcast the message, doesn't work yet.
This commit is contained in:
Dogukan
2020-10-20 23:54:29 +02:00
parent 4d161391b1
commit 381c142eaa
7 changed files with 81 additions and 27 deletions

View File

@@ -65,7 +65,6 @@ namespace Client
}
stream.BeginRead(buffer, 0, buffer.Length, new AsyncCallback(OnReadComplete), null);
}
private void handleData(byte[] message)
@@ -84,16 +83,18 @@ namespace Client
string textUsername = combo.Item1;
string textMsg = combo.Item2;
//TODO display username and message in chat window
Debug.WriteLine("Message username: {0}\t Message: {1}", textUsername, textMsg);
break;
case JSONConvert.LOBBY:
// lobby data
//TODO fill lobby with the data received
break;
case JSONConvert.CANVAS:
// canvas data
break;
default:
Debug.WriteLine("[CLIENT] Received weird identifier: " + id);
break;