Created
June 27, 2021 12:07
-
-
Save nkalra0123/8a4f5737037be7cb8aa0acbf339309fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do { | |
try { | |
final Socket finalAccept = httpd.getMyServerSocket().accept(); | |
if (this.timeout > 0) { | |
finalAccept.setSoTimeout(this.timeout); | |
} | |
final InputStream inputStream = finalAccept.getInputStream(); | |
httpd.asyncRunner.exec(httpd.createClientHandler(finalAccept, inputStream)); | |
} catch (IOException e) { | |
NanoHTTPD.LOG.log(Level.FINE, "Communication with the client broken", e); | |
} | |
} while (!httpd.getMyServerSocket().isClosed()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment