add a stub for CloseGracefully to h2quic.Server

ref #153, #124
This commit is contained in:
Lucas Clemente
2016-06-01 12:06:37 +02:00
parent 443fd530db
commit a6c62d1a26

View File

@@ -147,12 +147,18 @@ func (s *Server) handleRequest(session streamCreator, headerStream utils.Stream,
return nil
}
// Close the server
// Close the server immediately, aborting requests and sending CONNECTION_CLOSE frames to connected clients
func (s *Server) Close() error {
// TODO: implement
return nil
}
// CloseGracefully shuts down the server gracefully. The server sends a GOAWAY frame first, then waits for either timeout to trigger, or for all running requests to complete.
func (s *Server) CloseGracefully(timeout time.Duration) error {
// TODO: implement
return nil
}
// SetQuicHeaders can be used to set the proper headers that announce that this server supports QUIC.
// The values that are set depend on the port information from s.Server.Addr, and currently look like this (if Addr has port 443):
// Alternate-Protocol: 443:quic