| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 44b336a commit b8f3e42
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,9 +100,7 @@ public Server(PApplet parent, int port, String host) { | |||
| 100 | 100 | // which is called when a new guy connects | |
| 101 | 101 | try { | |
| 102 | 102 | serverEventMethod = | |
| 103 | - parent.getClass().getMethod("serverEvent", | ||
| 104 | - new Class[] { Server.class, | ||
| 105 | - Client.class }); | ||
| 103 | + parent.getClass().getMethod("serverEvent", Server.class, Client.class); | ||
| 106 | 104 | } catch (Exception e) { | |
| 107 | 105 | // no such method, or an error.. which is fine, just ignore | |
| 108 | 106 | } | |
@@ -297,6 +295,7 @@ public void dispose() { | |||
| 297 | 295 | } | |
| 298 | 296 | ||
| 299 | 297 | ||
| 298 | + @Override | ||
| 300 | 299 | public void run() { | |
| 301 | 300 | while (Thread.currentThread() == thread) { | |
| 302 | 301 | try { | |
@@ -306,7 +305,7 @@ public void run() { | |||
| 306 | 305 | addClient(client); | |
| 307 | 306 | if (serverEventMethod != null) { | |
| 308 | 307 | try { | |
| 309 | - serverEventMethod.invoke(parent, new Object[] { this, client }); | ||
| 308 | + serverEventMethod.invoke(parent, this, client); | ||
| 310 | 309 | } catch (Exception e) { | |
| 311 | 310 | System.err.println("Disabling serverEvent() for port " + port); | |
| 312 | 311 | e.printStackTrace(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments