MCPcopy
hub / github.com/NanoHttpd/nanohttpd / stop

Method stop

core/src/main/java/fi/iki/elonen/NanoHTTPD.java:2343–2353  ·  view source on GitHub ↗

Stop the server.

()

Source from the content-addressed store, hash-verified

2341 * Stop the server.
2342 */
2343 public void stop() {
2344 try {
2345 safeClose(this.myServerSocket);
2346 this.asyncRunner.closeAll();
2347 if (this.myThread != null) {
2348 this.myThread.join();
2349 }
2350 } catch (Exception e) {
2351 NanoHTTPD.LOG.log(Level.SEVERE, "Could not stop all connections", e);
2352 }
2353 }
2354
2355 public final boolean wasStarted() {
2356 return this.myServerSocket != null && this.myThread != null;

Callers 12

testMultipartFormDataMethod · 0.95
testTempFileInterfaceMethod · 0.95
closeAllConnectionsMethod · 0.95
tearDownMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80
executeInstanceMethod · 0.80
tearDownMethod · 0.80
testWebsocketClientMethod · 0.80
mainMethod · 0.80
tearDownMethod · 0.80

Calls 2

safeCloseMethod · 0.95
closeAllMethod · 0.65

Tested by 9

testMultipartFormDataMethod · 0.76
testTempFileInterfaceMethod · 0.76
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
testWebsocketClientMethod · 0.64
tearDownMethod · 0.64