From ed32fb301dd4de485ad3e7b6d9fc265257d3dfc6 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Sat, 20 Aug 2016 08:53:32 -0600 Subject: [PATCH] Updated Writing a Plugin: Server Type (markdown) --- Writing-a-Plugin:-Server-Type.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Writing-a-Plugin:-Server-Type.md b/Writing-a-Plugin:-Server-Type.md index ac7360a..8f803ff 100644 --- a/Writing-a-Plugin:-Server-Type.md +++ b/Writing-a-Plugin:-Server-Type.md @@ -4,6 +4,8 @@ Caddy ships with an HTTP server, but you can implement other server types and pl _To Caddy, the notion of a server is anything that can `Listen()` and `Serve()`. What that means and how that works is up to you. Feel free to be creative and liberal with this idea._ +If your server type can use TLS, it should take advantage of Caddy's magic TLS features. We describe how to do that at the end of this guide. + At a high level, plugging in a server type is very easy, using the [caddy.RegisterServerType()](https://godoc.org/github.com/mholt/caddy#RegisterServerType) function. You pass in the name of the server type and a [caddy.ServerType](https://godoc.org/github.com/mholt/caddy#ServerType) struct describing it. Here's a (somewhat simplified) example of how the HTTP server does it: