protohackers/cmd/speeddaemon/server.go

31 lines
411 B
Go

package main
import (
"net"
"protohackers/pkg/conn"
)
type server struct {
cameras []client
dispatchers []client
}
func newServer() *server {
return &server{
cameras: []client{},
dispatchers: []client{},
}
}
func (s *server) run() error {
err := conn.StartSimpleTCP(s.handleConnection)
if err != nil {
return err
}
return nil
}
func (s *server) handleConnection(conn net.Conn) {
}