summaryrefslogtreecommitdiffhomepage
path: root/plugins.go
diff options
context:
space:
mode:
authorMiek Gieben <[email protected]>2016-07-18 21:24:09 +0100
committerMatt Holt <[email protected]>2016-07-18 14:24:09 -0600
commit9315738dabc72f056df7e7f80ea44c3d5d44b75b (patch)
treef90865921b824d633cde94210a2f9d2febfe247a /plugins.go
parent502a8979a82cc414a3b56b373349d6bfd81a80df (diff)
downloadcaddy-9315738dabc72f056df7e7f80ea44c3d5d44b75b.tar.gz
caddy-9315738dabc72f056df7e7f80ea44c3d5d44b75b.zip
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
Diffstat (limited to 'plugins.go')
-rw-r--r--plugins.go3
1 files changed, 2 insertions, 1 deletions
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