summaryrefslogtreecommitdiff
path: root/Net1090/main.swift
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2026-09-09 16:47:05 +0100
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2026-09-09 16:47:05 +0100
commitdd31184b900636214897a1a08026279390049b92 (patch)
treebe9c7277b49590e4eeb267b0fd35e61ae6721133 /Net1090/main.swift
parent083679320dcceb8e370c4c0b793d7c26c9745019 (diff)
downloadADSBDecoder-dd31184b900636214897a1a08026279390049b92.tar.gz
ADSBDecoder-dd31184b900636214897a1a08026279390049b92.zip
queues are now have guardlocks
Diffstat (limited to 'Net1090/main.swift')
-rw-r--r--Net1090/main.swift13
1 files changed, 4 insertions, 9 deletions
diff --git a/Net1090/main.swift b/Net1090/main.swift
index 2620dca..deeae31 100644
--- a/Net1090/main.swift
+++ b/Net1090/main.swift
@@ -11,10 +11,9 @@ import NIO
var timer: Timer?
-let ADSBClient = NetADSBDecoder(host: "64.226.23.78", port: 30003)
+let ADSBClient = NetADSBDecoder(host: "192.168.7.61", port: 12345)
-print("Hello, World!")
-print("Start listening client 2")
+print("Net1090")
//var timer:Timer?
timer = Timer.scheduledTimer(
@@ -22,12 +21,8 @@ timer = Timer.scheduledTimer(
repeats: true
) { _ in
print("Timer drain queue")
- print("\(ADSBClient.msgarray.message_array.count)")
- if ADSBClient.msgarray.message_array.count > 0 {
- print(ADSBClient.msgarray.message_array.count)
- for i in 0..<ADSBClient.msgarray.message_array.count {
- print("adsb-message:\(ADSBClient.msgarray.message_array.popLast()!)")
- }
+ while let msg = ADSBClient.msgarray.pop() {
+ print(msg)
}
}