From a6c62d1a269f5de2196daaaae3f38b7b83289256 Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Wed, 1 Jun 2016 12:06:37 +0200 Subject: [PATCH] add a stub for CloseGracefully to h2quic.Server ref #153, #124 --- h2quic/server.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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