From d2f164462fe80970d1e85db3cc85fce115de0b6d Mon Sep 17 00:00:00 2001 From: Chris Van de Gejuchte Date: Mon, 2 Oct 2017 11:08:29 +0200 Subject: [PATCH] adds NewServerTLS --- redcon.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/redcon.go b/redcon.go index 0a9b56d..90c9e9e 100644 --- a/redcon.go +++ b/redcon.go @@ -101,6 +101,16 @@ func NewServer(addr string, return NewServerNetwork("tcp", addr, handler, accept, closed) } +// NewServerTLS returns a new Redcon TLS server configured on "tcp" network net. +func NewServerTLS(addr string, + handler func(conn Conn, cmd Command), + accept func(conn Conn) bool, + closed func(conn Conn, err error), + config *tls.Config, +) *TLSServer { + return NewServerNetworkTLS("tcp", addr, handler, accept, closed, config) +} + // NewServerNetwork returns a new Redcon server. The network net must be // a stream-oriented network: "tcp", "tcp4", "tcp6", "unix" or "unixpacket" func NewServerNetwork(