Skip to content

Commit 3df1214

Browse files
authored
Merge pull request tidwall#12 from chrisvdg/gracefull-shutdown
adds NewServerTLS
2 parents f2794a0 + d2f1644 commit 3df1214

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

redcon.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ func NewServer(addr string,
101101
return NewServerNetwork("tcp", addr, handler, accept, closed)
102102
}
103103

104+
// NewServerTLS returns a new Redcon TLS server configured on "tcp" network net.
105+
func NewServerTLS(addr string,
106+
handler func(conn Conn, cmd Command),
107+
accept func(conn Conn) bool,
108+
closed func(conn Conn, err error),
109+
config *tls.Config,
110+
) *TLSServer {
111+
return NewServerNetworkTLS("tcp", addr, handler, accept, closed, config)
112+
}
113+
104114
// NewServerNetwork returns a new Redcon server. The network net must be
105115
// a stream-oriented network: "tcp", "tcp4", "tcp6", "unix" or "unixpacket"
106116
func NewServerNetwork(

0 commit comments

Comments
 (0)