Capstan is a Golang web framework that shares some similarities with others in its segment.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
297B

  1. package capstan
  2. import (
  3. "net"
  4. "net/http"
  5. )
  6. type HTTPServer struct {
  7. http.Server
  8. listener net.Listener
  9. }
  10. func (h *HTTPServer) Serve(listener net.Listener) error {
  11. h.listener = listener
  12. return h.Server.Serve(listener)
  13. }
  14. func (h *HTTPServer) Listener() net.Listener {
  15. return h.listener
  16. }