protohackers/cmd/speeddaemon/server.go

31 lines
411 B
Go
Raw Permalink Normal View History

2023-09-15 21:20:51 +00:00
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) {
}