2 // Copyright 2020 Blue Static <https://www.bluestatic.org>
3 // This program is free software licensed under the GNU General Public License,
4 // version 3.0. The full text of the license can be found in LICENSE.txt.
5 // SPDX-License-Identifier: GPL-3.0-only
18 type ServerControlMessage
int
21 ServerControlFatalError ServerControlMessage
= iota
25 func RunAcceptLoop(l net
.Listener
, c
chan<- net
.Conn
, log
*zap
.Logger
) {
27 conn
, err
:= l
.Accept()
29 log
.Error("accept", zap
.Error(err
))
38 func CreateReloadSignal() <-chan os
.Signal
{
39 reloadChan
:= make(chan os
.Signal
, 1)
40 signal
.Notify(reloadChan
, syscall
.SIGHUP
)