mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
Version 3.0.0-beta cleaned
This commit is contained in:
20
plugin/iriscontrol/main_controls.go
Normal file
20
plugin/iriscontrol/main_controls.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package iriscontrol
|
||||
|
||||
// for the main server
|
||||
func (i *irisControlPlugin) StartServer() {
|
||||
if i.station.Server().IsListening() == false {
|
||||
if i.station.Server().IsSecure() {
|
||||
//listen with ListenTLS
|
||||
i.station.ListenTLS(i.station.Server().Config.ListeningAddr, i.station.Server().Config.CertFile, i.station.Server().Config.KeyFile)
|
||||
} else {
|
||||
//listen normal
|
||||
i.station.Listen(i.station.Server().Config.ListeningAddr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (i *irisControlPlugin) StopServer() {
|
||||
if i.station.Server().IsListening() {
|
||||
i.station.Close()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user