server/tcp_tls/tcp_tls.go

20 lines
277 B
Go
Raw Normal View History

2017-10-26 12:30:55 +00:00
package tcp_tls
import (
"crypto/tls"
"net"
"git.loafle.net/commons_go/server"
)
type ServerHandlers struct {
server.ServerHandlers
tlsConfig *tls.Config
}
func (sh *ServerHandlers) Listen() (net.Listener, error) {
return tls.Listen("tcp", sh.Addr, sh.tlsConfig)
}