added more client-side endpoints

This commit is contained in:
2025-03-26 23:44:41 +09:00
parent 5dbe9cd34e
commit 0cfd241e00
5 changed files with 426 additions and 21 deletions

View File

@ -1070,6 +1070,9 @@ func (s *Server) PacketStream(strm Hodu_PacketStreamServer) error {
}
if s.stop_req.Load() {
// this check should still suffer race condition
// becuase this function itself runs as a goroutine and is fired
// from the grpc server code without synchronizing with hodu.
return fmt.Errorf("new conneciton prohibited after stop - %s", p.Addr.String())
}
@ -1382,9 +1385,9 @@ func NewServer(ctx context.Context, name string, logger Logger, cfg *ServerConfi
s.Cfg = cfg
s.ext_svcs = make([]Service, 0, 1)
s.pts_limit = cfg.MaxPeers
s.pts_list = list.New()
s.route_list = list.New()
s.pts_list = list.New()
s.pts_limit = cfg.MaxPeers
s.cts_limit = cfg.RpcMaxConns
s.cts_next_id = 1
s.cts_map = make(ServerConnMap)