iris/plugin/iriscontrol/main_controls.go

21 lines
541 B
Go
Raw Normal View History

2016-05-30 16:08:09 +02:00
package iriscontrol
// for the main server
func (i *irisControlPlugin) StartServer() {
if i.station.HTTPServer.IsListening() == false {
if i.station.HTTPServer.IsSecure() {
2016-05-30 16:08:09 +02:00
//listen with ListenTLS
i.station.ListenTLS(i.station.Config.Server.ListeningAddr, i.station.Config.Server.CertFile, i.station.Config.Server.KeyFile)
2016-05-30 16:08:09 +02:00
} else {
//listen normal
i.station.Listen(i.station.Config.Server.ListeningAddr)
2016-05-30 16:08:09 +02:00
}
}
}
func (i *irisControlPlugin) StopServer() {
if i.station.HTTPServer.IsListening() {
2016-05-30 16:08:09 +02:00
i.station.Close()
}
}