32 lines
542 B
Go
32 lines
542 B
Go
|
package socket
|
||
|
|
||
|
import (
|
||
|
"git.loafle.net/commons/server-go"
|
||
|
)
|
||
|
|
||
|
type ServerHandler interface {
|
||
|
server.ServerHandler
|
||
|
server.ConnectionHandler
|
||
|
ReadWriteHandler
|
||
|
}
|
||
|
|
||
|
type ServerHandlers struct {
|
||
|
server.ServerHandlers
|
||
|
server.ConnectionHandlers
|
||
|
ReadWriteHandlers
|
||
|
}
|
||
|
|
||
|
func (sh *ServerHandlers) Validate() error {
|
||
|
if err := sh.ServerHandlers.Validate(); nil != err {
|
||
|
return err
|
||
|
}
|
||
|
if err := sh.ConnectionHandlers.Validate(); nil != err {
|
||
|
return err
|
||
|
}
|
||
|
if err := sh.ReadWriteHandlers.Validate(); nil != err {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|