v0.7: pre-synth buffering, session IDs, segment timeout playback
This commit is contained in:
@@ -24,18 +24,19 @@ var cts = new CancellationTokenSource();
|
||||
var recvTask = Task.Run(() => ReceiveLoop(sock, cts.Token));
|
||||
|
||||
var destEp = new IPEndPoint(IPAddress.Broadcast, 67);
|
||||
uint session = 1;
|
||||
uint nonce = 0;
|
||||
|
||||
while (!cts.Token.IsCancellationRequested)
|
||||
{
|
||||
nonce++;
|
||||
string msg = $"HKMSTR {nonce}\n";
|
||||
string msg = $"HKMSTR {session} {nonce}\n";
|
||||
byte[] payload = Encoding.UTF8.GetBytes(msg);
|
||||
|
||||
try
|
||||
{
|
||||
int sent = sock.SendTo(payload, destEp);
|
||||
Console.WriteLine($"[{DateTime.Now:HH:mm:ss.fff}] SENT n={nonce} {sent} bytes");
|
||||
Console.WriteLine($"[{DateTime.Now:HH:mm:ss.fff}] SENT s={session} n={nonce} {sent} bytes");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user