Refactor server modules into main package and improve error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user