Connect two sketches on two computers


#1

Hey everyone!
I just got a little question for you. Right now I work for a project where I have to connect two Processing sketches on two computers, to send an integer between those two computers. I still found some libraries like processing.net or the OOCSI library. Unfortunately I did not found a solution to connection two sketches on different computers with these libraries. I just can connect two sketches on one single computer.
Maybe some of you have an idea, how to solve my problem.

Thanks,
Felix


#2

If you have processing.net library¸you should also have File>Examples>Libraries>Network>SharedCanvasClient and SharedCanvasServer examples. I suggest you to get these working between computers, then base your code on them.

Also, where are these computers located in relation to each other? In a single LAN network or across a globe?


#3

Thanks for your quick reply!
Both computer are connected at the same WLAN network. Do I have to connect both at the network enviroment?


#4

I don’t think so. I think it’s enough as it is - just make sure to find out server’s IP in that WLAN network, and dial
that into the client, and I think it should work.

(yeah, not so quick reply now… ._.)


#5

I made pong using processing.net a while back. It lags a bit, but here is the code:


It’s a bit messy, but it works.


#6

@Architector_4 @Quillbert1
Thank a lot you for your help. It works perfect!