Disconnect from the server: internal use only. This should only be called by the internal functions in PApplet, use stop() instead from within your own applets.
()
| 187 | * use stop() instead from within your own applets. |
| 188 | */ |
| 189 | public void dispose() { |
| 190 | thread = null; |
| 191 | try { |
| 192 | if (input != null) { |
| 193 | input.close(); |
| 194 | input = null; |
| 195 | } |
| 196 | } catch (Exception e) { |
| 197 | e.printStackTrace(); |
| 198 | } |
| 199 | |
| 200 | try { |
| 201 | if (output != null) { |
| 202 | output.close(); |
| 203 | output = null; |
| 204 | } |
| 205 | } catch (Exception e) { |
| 206 | e.printStackTrace(); |
| 207 | } |
| 208 | |
| 209 | try { |
| 210 | if (socket != null) { |
| 211 | socket.close(); |
| 212 | socket = null; |
| 213 | } |
| 214 | } catch (Exception e) { |
| 215 | e.printStackTrace(); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | |
| 220 | @Override |
no test coverage detected