Hi all, I've been looking at the HttpServer API recently with the aim of making its API a little more friendly to the average joe.
One area that feels like it would be an easy win, and correct me if I'm wrong, is with the "backlog" parameter provided at server creation. HttpServer.create(new InetSocketAddress(4000), 0); HttpServer.create().bind(new InetSocketAddress(4000), 0); In both cases, values less than or equal to 0 are documented to mean "use a system default." It feels beneficial to provide overloads which do not require users to specify that. HttpServer.create(new InetSocketAddress(4000)); HttpServer.create().bind(new InetSocketAddress(4000)); With perhaps similar treatment given to the create method which sets up an initial context. (There is at least 1 more "magic number" in the API @ .sendResponseHeaders, but one thing at a time)
