mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-20 19:04:37 +01:00
initial refactor-servers commit
This commit is contained in:
@@ -2,6 +2,7 @@ package entranceserver
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"erupe-ce/server/channelserver"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@@ -19,6 +20,7 @@ type Server struct {
|
||||
sync.Mutex
|
||||
logger *zap.Logger
|
||||
erupeConfig *_config.Config
|
||||
worlds [][]*channelserver.Server
|
||||
db *sqlx.DB
|
||||
listener net.Listener
|
||||
isShuttingDown bool
|
||||
@@ -68,6 +70,10 @@ func (s *Server) Shutdown() {
|
||||
s.listener.Close()
|
||||
}
|
||||
|
||||
func (s *Server) SetWorlds(c [][]*channelserver.Server) {
|
||||
s.worlds = c
|
||||
}
|
||||
|
||||
// acceptClients handles accepting new clients in a loop.
|
||||
func (s *Server) acceptClients() {
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user