diff options
author | Miek Gieben <[email protected]> | 2016-07-18 21:24:09 +0100 |
---|---|---|
committer | Matt Holt <[email protected]> | 2016-07-18 14:24:09 -0600 |
commit | 9315738dabc72f056df7e7f80ea44c3d5d44b75b (patch) | |
tree | f90865921b824d633cde94210a2f9d2febfe247a /plugins.go | |
parent | 502a8979a82cc414a3b56b373349d6bfd81a80df (diff) | |
download | caddy-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.go | 3 |
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 |