Skip to content

Commit

Permalink
Optimize TerminalSimulator
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Feb 24, 2022
1 parent 0f75027 commit cbd2d81
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Portalum.Zvt.TerminalSimulator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class Program
{
private static byte[] _acknowledgePackage = new byte[] { 0x80, 0x00, 0x00 };
private static byte[] _completionPackage = new byte[] { 0x06, 0x0F, 0x00 };
private static readonly byte[] _acknowledgePackage = new byte[] { 0x80, 0x00, 0x00 };
private static readonly byte[] _completionPackage = new byte[] { 0x06, 0x0F, 0x00 };

private static SimpleTcpServer? _tcpServer;

Expand All @@ -24,6 +24,11 @@ static void Main(string[] args)

private static void Events_DataReceived(object? sender, DataReceivedEventArgs e)
{
if (_tcpServer == null)
{
return;
}

Console.WriteLine(BitConverter.ToString(e.Data));

var data = e.Data.AsSpan();
Expand Down

0 comments on commit cbd2d81

Please sign in to comment.