This commit is contained in:
@@ -15,7 +15,7 @@ type Server struct {
|
||||
func Listen(address string) (*Server, error) {
|
||||
listener, err := net.Listen("tcp", address)
|
||||
server := &Server{
|
||||
NewTCPServerMux(100),
|
||||
NewTCPServerMux(),
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@@ -40,7 +40,7 @@ type TCPServerMux struct {
|
||||
functions map[uint32]func(data []byte) (uint32, []byte, error)
|
||||
}
|
||||
|
||||
func NewTCPServerMux(maxClients int) *TCPServerMux {
|
||||
func NewTCPServerMux() *TCPServerMux {
|
||||
m := &TCPServerMux{
|
||||
mu: sync.RWMutex{},
|
||||
listeners: make(map[uint32]func(data []byte) error),
|
||||
|
||||
Reference in New Issue
Block a user