SelectChannelConnector alternative class in Jetty 9 and above

前端 未结 1 565
暗喜
暗喜 2021-01-20 12:26

What is the alternative class of SelectChannelConnector for jetty 9 and above version? Also what is the use of SelectChannelConnector class? And also what is the use of conn

相关标签:
1条回答
  • 2021-01-20 12:44

    A Connector in jetty terms is the component that binds to a port, accepts incoming connections, negotiates the protocols (in case of SSL/TLS/ALPN and things like HTTP/2), and hands off the raw endpoint to the appropriate jetty internal component to process the request.

    Gone are the days of listening on port 8080 and answering only in HTTP/1.x

    Now you can listen on port 8080, and the incoming connection negotiates SSL > TLS > > ALPN > HTTP/2 (native) > HTTP/1.1 > HTTP/2 (h2c upgrate) etc. Essentially picking the appropriate connection setup based on what both the client and the server can handle.

    There is only ServerConnector left, and it has many configuration options to tell it what you want it to support.

    See the embedded examples or the documentation to understand how to configure it.

    0 讨论(0)
提交回复
热议问题