MCPcopy Index your code
hub / github.com/bettercap/bettercap / Start

Method Start

modules/https_server/https_server.go:154–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152}
153
154func (mod *HttpsServer) Start() error {
155 if err := mod.Configure(); err != nil {
156 return err
157 }
158
159 return mod.SetRunning(true, func() {
160 mod.Info("starting on https://%s", mod.server.Addr)
161 if err := mod.server.ListenAndServeTLS(mod.certFile, mod.keyFile); err != nil && err != http.ErrServerClosed {
162 mod.Error("%v", err)
163 mod.Stop()
164 }
165 })
166}
167
168func (mod *HttpsServer) Stop() error {
169 return mod.SetRunning(false, func() {

Callers 1

NewHttpsServerFunction · 0.95

Calls 5

ConfigureMethod · 0.95
StopMethod · 0.95
SetRunningMethod · 0.80
InfoMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected