| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bbfcbb3 commit b5dd3b4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -129,7 +129,15 @@ public Client(PApplet parent, Socket socket) throws IOException { | |||
| 129 | 129 | thread.start(); | |
| 130 | 130 | ||
| 131 | 131 | // reflection to check whether host sketch has a call for | |
| 132 | - // public void disconnectEvent(processing.net.Client) | ||
| 132 | + // public void clientEvent(processing.net.Client) | ||
| 133 | + // which would be called each time an event comes in | ||
| 134 | + try { | ||
| 135 | + clientEventMethod = | ||
| 136 | + parent.getClass().getMethod("clientEvent", Client.class); | ||
| 137 | + } catch (Exception e) { | ||
| 138 | + // no such method, or an error.. which is fine, just ignore | ||
| 139 | + } | ||
| 140 | + // do the same for disconnectEvent(Client c); | ||
| 133 | 141 | try { | |
| 134 | 142 | disconnectEventMethod = | |
| 135 | 143 | parent.getClass().getMethod("disconnectEvent", Client.class); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments