[ADDITION] servercommunication towards the client.
Still in progress not functional because of a null exception when receiving the broadcast message.
This commit is contained in:
@@ -24,6 +24,7 @@ namespace SharedClientServer
|
||||
public static (string,string) GetUsernameAndMessage(byte[] json)
|
||||
{
|
||||
string msg = Encoding.ASCII.GetString(json);
|
||||
Debug.WriteLine("Sent data: {0}", msg);
|
||||
dynamic payload = JsonConvert.DeserializeObject(msg);
|
||||
|
||||
return (payload.username, payload.message);
|
||||
@@ -49,7 +50,6 @@ namespace SharedClientServer
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// constructs a message that can be sent to the clients or server
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user