ngrok / ngrok-java

Embed ngrok secure ingress into your Java apps with a single line of code.
Other
27 stars 8 forks source link

Add `ServerSocketChannel` and `SocketChannel` implementations #19

Open CarlAmko opened 1 year ago

CarlAmko commented 1 year ago

Supporting socket channels will allow better concurrent access to the socket's backing data stream. We can better support asynchronous workflows by providing a non-blocking mechanism for reads and writes.

To complete this, an end user should be able to:

  1. Have access to a comparable SocketChannel / NativeSocketChannel implementation that closely mirrors our blocking socket behavior,
  2. Use a ServerSocketChannel in a similar manner to a ServerSocket (Java17+)
CK-Ward commented 1 year ago

We anticipate that Java 21, with the introduction of virtual threads, will impact our approach to solving this issue. See: https://openjdk.org/projects/jdk/21/

cc @nikolay-ngrok