This commit is contained in:
2026-01-09 23:55:14 +01:00
16 changed files with 1514 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import (
)
type Client struct {
<<<<<<< HEAD
host string
port int
conn net.Conn
@@ -22,6 +23,11 @@ type Client struct {
statusMu sync.RWMutex
stopChan chan struct{}
running bool
=======
host string
port int
conn net.Conn
>>>>>>> 4ab192418e21065c68d59777493ea03b76c061e7
}
type Status struct {
@@ -52,9 +58,14 @@ type Status struct {
func New(host string, port int) *Client {
return &Client{
<<<<<<< HEAD
host: host,
port: port,
stopChan: make(chan struct{}),
=======
host: host,
port: port,
>>>>>>> 4ab192418e21065c68d59777493ea03b76c061e7
}
}
@@ -99,6 +110,7 @@ func (c *Client) Start() error {
return nil
}
<<<<<<< HEAD
// Try to connect, but don't fail if it doesn't work
// The poll loop will keep trying
_ = c.Connect()
@@ -209,6 +221,8 @@ func (c *Client) sendCommand(cmd string) (string, error) {
return "", fmt.Errorf("not connected")
}
=======
>>>>>>> 4ab192418e21065c68d59777493ea03b76c061e7
// Get next command ID from global counter
cmdID := GetGlobalCommandID().GetNextID()