26 lines
428 B
Go
26 lines
428 B
Go
package server
|
|
|
|
import (
|
|
"net"
|
|
|
|
"git.loafle.net/commons/server-go"
|
|
cswf "git.loafle.net/commons/server-go/web/fasthttp"
|
|
)
|
|
|
|
type ServerHandler interface {
|
|
cswf.ServerHandler
|
|
}
|
|
|
|
type ServerHandlers struct {
|
|
cswf.ServerHandlers
|
|
}
|
|
|
|
func (sh *ServerHandlers) Listener(serverCtx server.ServerCtx) (net.Listener, error) {
|
|
l, err := net.Listen("tcp", "192.168.1.101:44449")
|
|
if nil != err {
|
|
return nil, err
|
|
}
|
|
|
|
return l, nil
|
|
}
|