Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdornedJoker committed Dec 26, 2024
1 parent a721d1a commit 127dd63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions NetClassic/ReadWrite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ReadWrite
{
public static string ReadString(byte[] array, int index)
{
return Encoding.UTF8.GetString(array.ToArray(), index, 64).TrimEnd();
return Encoding.ASCII.GetString(array.ToArray(), index, 64).TrimEnd();
}

public static int GetPrevStringLength(string data)
Expand All @@ -29,7 +29,7 @@ public static short ReadShort(byte[] array, int index)

public static byte[] WriteString(string Message)
{
byte[] message = Encoding.UTF8.GetBytes(Message);
byte[] message = Encoding.ASCII.GetBytes(Message);

MemoryStream memoryStream = new MemoryStream();
memoryStream.Write(message);
Expand Down
2 changes: 0 additions & 2 deletions NetClassic/ServerHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public static async Task SendAllPlayers(byte[] data)
try
{
await client.playerClient.SendAsync(data);
//await Task.Delay(5); // Small delay between clients
}
catch (Exception e)
{
Expand All @@ -39,7 +38,6 @@ public static async Task SendAllPlayersExcept(int id, byte[] data)
try
{
await client.playerClient.SendAsync(data);
//await Task.Delay(5); // Small delay between clients
}
catch (Exception e)
{
Expand Down

0 comments on commit 127dd63

Please sign in to comment.