Send content to other sketch via network
in
Core Library Questions
•
11 months ago
Hello,
as the title says I'd like to show the content of one sketch in another sketch. I send the pixel array with the built-in network library but the transfer is very slow even with a window size of 200 x 200. Basically I do the following:
Server:
- Convert pixels array to byte array.
- Merge all byte arrays.
- Send byte array to client.
Client:
- Wait, till there are more ( or as many) pixels as there are in the clients window ( the client's window dimension is the same as the server's window dimension).
- Convert byte array into seperate byte arrays for each pixel.
- Convert byte array to int.
- Set pixel.
Client:
http://pastebin.com/fVxdP4Uz
Server:
http://pastebin.com/NYaeVuU1
Thanks in advance.
1