misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2024-09-20 15:30:13 +02:00
commit 6af2de6de9
6 changed files with 463 additions and 51 deletions

View file

@ -42,6 +42,7 @@ type Acceptor struct {
}
type HandlerContext struct {
service string
mod *ZeroGod
client net.Conn
srvHost string
@ -100,8 +101,9 @@ func (a *Acceptor) Start() (err error) {
a.mod.Error("%v", err)
}
} else {
a.mod.Info("accepted connection for service %s (port %d): %v", tui.Green(a.service), a.port, conn.RemoteAddr())
a.mod.Debug("accepted connection for service %s (port %d): %v", tui.Green(a.service), a.port, conn.RemoteAddr())
go a.handler.Handle(&HandlerContext{
service: a.service,
mod: a.mod,
client: conn,
srvHost: a.srvHost,