This commit is contained in:
2024-10-22 00:32:59 +07:00
parent ecedb0ea5d
commit 83816777b7
7 changed files with 363 additions and 841 deletions

View File

@ -11,7 +11,7 @@ import (
log "github.com/sirupsen/logrus"
)
var spotRe *regexp.Regexp = regexp.MustCompile(`DX\sde\s([\w\d]+).*:\s+(\d+.\d)\s+([\w\d]+)\s+(CW|SSB|FT8|FT4|RTTY|USB|LSB)?\s+(.*)\s\s\s+([\d]+\w{1})`)
var spotRe *regexp.Regexp = regexp.MustCompile(`DX\sde\s([\w\d]+).*:\s+(\d+.\d)\s+([\w\d\/]+)\s+(CW|SSB|FT8|FT4|RTTY|USB|LSB)?\s+(.*)\s\s\s+([\d]+\w{1})`)
var count int = 0
type TCPClient struct {
@ -150,10 +150,10 @@ func (c *TCPClient) ReadLine() {
c.Log.Info("start receiving spots")
}
start := time.Now()
ProcessTelnetSpot(spotRe, message, c.SpotChan, c.Log, c.Countries)
elapsed := time.Since(start)
Log.Infof("Total time for processing spot: %s", elapsed)
// start := time.Now()
ProcessTelnetSpot(spotRe, message, c.SpotChan, c.Countries)
// elapsed := time.Since(start)
// Log.Infof("Total time for processing spot: %s", elapsed)
// Send the spot message to TCP server
if len(c.TCPServer.Clients) > 0 {