daemon-socket-go-example/msghandlers/echorequesthandler.go

14 lines
259 B
Go

package msghandlers
import (
"daemonSocketExample/daemonconn"
"log/slog"
)
func handleEchoRequest(msg daemonconn.Message) error {
echoRequest := msg.(daemonconn.EchoRequest)
slog.Info("Got echo request", "echoByte", echoRequest.EchoByte)
return nil
}