diff --git a/h2quic/server.go b/h2quic/server.go index 94dddf76..1c6bef08 100644 --- a/h2quic/server.go +++ b/h2quic/server.go @@ -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