Loading...
Logo
Processing Forum
Hi,


I'm working on an Processing project, where I send data via the network to another Processing running machine. The problem is, when the second (server) machine isnt running, the first machine (client) crashes, because he cant connect to the server.

As far as I know, I need to do a try & catch. So if he can't connect to the server, he waits a bit, tries it again...


I never done something like this before, and as far as I searched for it here, I haven't found a valuable solution.

So, anyone can help me on this topic?

I'm using the Network library, and I try to connect to the server like this:

c = new Client(this, "192.168.10.22", 12345);



Thanks for any help!

Greetings
Nicolas

Replies(1)

Hi,


I just found a solution to this problem, written in an old post, this is why I haven't found it on the beginning.

the key for the problem is to ask if c.active(), else try to reconnect.


gr
n