ServerBuilder and listening
- Vorherrschende Sprache
- Java
- Sterne
- 12.1k
- Forks
- 4k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 37
Beschreibung
Currently, the standard way to listen on a socket is to call `addPort()`, but from recent requests, this API is too limited. I would like to explore some ideas for expanding this functionality. Specifically:
1. Make a standard way to add multiple ports to a single server.
2. Make it possible to listen on things other than ports, in particular `SocketAddress`es.
3. Make it possible to add more ports / sockets after a Server has been built.
1. This would effectively allow a server to add ports after `start()`
2. Maybe allow servers to gracefully close ports they started on.
3. Support having no listening ports on the builder. This would mean adding a ServerBuilder ctor that has no ports at all.
This issue is more exploratory rather than mandatory. Right now the request is just to listen on multiple ports, but we should be careful to not add overlapping APIs (such as on both Server and ServerBuilder).
cc: @ejona86
Beitragsleitfaden
Rechercherichtung
Start by reading ServerBuilder and the existing addPort() flow, then inspect how Server and start() handle listening. Compare the requested multiple ports, SocketAddresses, post-start additions, and graceful closure to identify overlapping API choices. Done requires an agreed scope and design before implementation can be defined.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- backend-api-design, networking
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100