[ADD] add constant identifiers to JSONConvert and made serverclient and client use them
This commit is contained in:
@@ -7,6 +7,10 @@ namespace SharedClientServer
|
||||
{
|
||||
class JSONConvert
|
||||
{
|
||||
public const byte LOGIN = 0x01;
|
||||
public const byte MESSAGE = 0x02;
|
||||
public const byte LOBBY = 0x03;
|
||||
public const byte CANVAS = 0x04;
|
||||
public static (string,string) GetUsernameAndMessage(byte[] json)
|
||||
{
|
||||
string msg = Encoding.ASCII.GetString(json);
|
||||
@@ -21,6 +25,11 @@ namespace SharedClientServer
|
||||
return payload.username;
|
||||
}
|
||||
|
||||
public static byte[] GetUsernameMessage(string username)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructs a message that can be sent to the clients or server
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user