Refactor server modules into main package and improve error handling

This commit is contained in:
adman
2026-02-24 23:27:56 +01:00
parent 85529b965b
commit bd83b9689e
18 changed files with 137 additions and 508 deletions
+11 -6
View File
@@ -45,6 +45,17 @@ const (
Client
)
func (a Actor) String() string {
switch a {
case Servee:
return "Servee"
case Client:
return "Client"
default:
return "Unknown"
}
}
func (a Actor) SendDirection() Direction {
switch a {
case Servee:
@@ -67,12 +78,6 @@ func (a Actor) ReceiveDirection() Direction {
}
}
type PacketIdentifier struct {
Direction Direction
State State
Name string
}
type (
ToDo struct{}
RestBuffer []byte