sojamo
Re: Send data between 2 pc's running processing
Reply #1 - Jun 18th , 2009, 9:32pm
you can do it both ways. when it comes to networking computers in a loca network, i prefer a connectionless network protocol like UDP instead of the connection-oriented TCP protocol. UDP or TCP protocol? the difference is that with UDP you just send out messages to an ip address and port number, the protocol does not care if the message reaches its destination, the protocol does not know about the existence of the destination. tcp on the other side makes sure each message that was sent gets to its dedicated location in the exact order it was sent. TCP does take better care of data sent across a network but is also more particular when it comes to setting up network connections (server has to run first before clients can connect. TCP is good for sending big chunks of data e.g. images, video, files.) processing comes with a tcp server/client example that you could try (SharedCanvasClient,SharedCanvasServer). UDP is pretty straight forward - you start listening for messages and you sent messages. OSC itself is not a network protocol, but can operate on top of a network protocol. for oscP5, UDP is the default network protocol. to make 2 different computers communicate with each other, you need to know each computer's ip address which, in case of oscP5, are used as the remote netAddress. the oscP5sendReceive example might be a good starting point. connection-wise you can use a local area network, e.g. connecting computers with a router (your ip address would probably start with 192.168.x.x or 10.x.x.x ). or, if you only have 2 computers you can connect them with an ethernet cable and assign a manual ip address for each machine (same goes for wifi connection, on mac you can try 'create network...' in your network settings to setup a small local network). if i would make a recommendation, that would be OSC. best, andreas