hy,
can you make a code example?
i'm working with the SharedCanvasServer example. this works great.
the only thing is, if the client starts earlier than the server, it would give me this error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:433)
at java.net.Socket.connect(Socket.java:524)
at java.net.Socket.connect(Socket.java:474)
at java.net.Socket.<init>(Socket.java:371)
at java.net.Socket.<init>(Socket.java:184)
at processing.net.Client.<init>(Client.java:60)
at SharedCanvasClient.setup(SharedCanvasClient.java:43)
at processing.core.PApplet.handleDraw(PApplet.java:1402)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:613)
so i wondered, if there is a workaround, so the app doesnt crash.
is try/catch a way? what is the exception I have to set after catch(***)
sorry, I'm not the most talented programmer switzerland has ever seen.
thank you for the help!