From 963132892a363c3ff7fb1d56ae218f011dca025c Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 23 Nov 2022 10:51:07 +1300 Subject: [PATCH] add a Server.ServeQUICConn method (#47) --- server.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server.go b/server.go index d2ab837..2b99695 100644 --- a/server.go +++ b/server.go @@ -114,6 +114,14 @@ func (s *Server) Serve(conn net.PacketConn) error { return s.H3.Serve(conn) } +// ServeQUICConn serves a single QUIC connection. +func (s *Server) ServeQUICConn(conn quic.Connection) error { + if err := s.initialize(); err != nil { + return err + } + return s.H3.ServeQUICConn(conn) +} + func (s *Server) ListenAndServe() error { if err := s.initialize(); err != nil { return err