From 9315738dabc72f056df7e7f80ea44c3d5d44b75b Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 18 Jul 2016 21:24:09 +0100 Subject: Allow for UDP servers (#935) * Allow for UDP servers Extend the Server interface with ServePacket and ListenPacket - this is in the same vein as the net package. Plumb the packetconn through the start and restart phases. Rename RestartPair to RestartTriple as it now also contains a Packet. Not that these can now be nil, so we need to check for that when restarting. * Update the documentation --- plugins.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins.go') diff --git a/plugins.go b/plugins.go index 895ed01ed..022674720 100644 --- a/plugins.go +++ b/plugins.go @@ -82,10 +82,11 @@ func ValidDirectives(serverType string) []string { return stype.Directives } -// serverListener pairs a server to its listener. +// serverListener pairs a server to its listener and/or packetconn. type serverListener struct { server Server listener net.Listener + packet net.PacketConn } // Context is a type which carries a server type through -- cgit v1.2.3