Server & Client


#1

hi all

What is the best,fastes and safety library to use for communication between Server(PC) and Client’s(android) ?
I want to send/receive a text(~500 chars) and Images (0-1 Mbytes) .

thanx
basher


#2

Check this

https://shiffman.net/processing.org/udp/2010/11/13/streaming-video-with-udp-in-processing/

Download the link at the bottom of the page. Include these lines in both the sender and receiver:

import java.net.*;
import java.io.*;

For the receiver, you need to call cam.start() at the end of setup. Now, run the sender then the receiver and you should be able to see the video being streamed from sender to receiver. If you don’t get any video, verify your camera works running a stand alone sketch only for that purpose. You can find an example in the Capture folder in the provided examples.

After you get this example working, you can modified it to send single images and data packages. You can check the previous forum for Android UDP examples.

Additional references:

https://forum.processing.org/two/discussion/11090/kinect-depth-data-via-udp
https://stackoverflow.com/questions/7200032/udp-sockets-processing

Kf