MCPcopy Create free account
hub / github.com/benfry/processing4 / stop

Method stop

java/libraries/net/src/processing/net/Client.java:158–177  ·  view source on GitHub ↗

Disconnects from the server. Use to shut the connection when you're finished with the Client. @webref client @webBrief Disconnects from the server @usage application

()

Source from the content-addressed store, hash-verified

156 * @usage application
157 */
158 public void stop() {
159 if (disconnectEventMethod != null && thread != null){
160 try {
161 disconnectEventMethod.invoke(parent, this);
162 } catch (Exception e) {
163 Throwable cause = e;
164 // unwrap the exception if it came from the user code
165 if (e instanceof InvocationTargetException && e.getCause() != null) {
166 cause = e.getCause();
167 }
168 cause.printStackTrace();
169 disconnectEventMethod = null;
170 }
171 }
172 if (disposeRegistered) {
173 parent.unregisterMethod("dispose", this);
174 disposeRegistered = false;
175 }
176 dispose();
177 }
178
179
180 /**

Callers 2

runMethod · 0.95
writeMethod · 0.95

Calls 3

disposeMethod · 0.95
unregisterMethodMethod · 0.80
printStackTraceMethod · 0.45

Tested by

no test coverage detected