ksrv/server.go

25 lines
347 B
Go
Raw Normal View History

2021-11-03 17:17:58 +00:00
package kmux
import (
"net/http"
)
type kserver struct {
http.Server
}
// Listen to addr
func (s *kserver) Listen(addr string) *kserver {
s.Addr = addr
return s
}
// Serve alias to ListenAndServe
func (s *kserver) Serve() error {
return s.ListenAndServe()
}
func (s *kserver) ListenAndServe() error {
return s.Server.ListenAndServe()
}