Client terminates Gnuplot
in
Core Library Questions
•
20 days ago
Hi,
In my sketch I open Gnuplot to plot some data. I use the "
-persist" parameter to make the plot window stay open until I stop the sketch.
Strangely, if I have a network client that receives some data from a server, Gnuplot will terminate after a couple of seconds.
The test code below works fine without a Client (if line 12. is commented out). Could someone replicate the problem? You need, of course, Gnuplot installed.
I'm using Processing 2.0.1 on Win7.
Thanks,
Gyula
Test code:
- import processing.net.*;
- int myByteArraySize = 10000;
- byte[] byteBuffer = new byte[myByteArraySize];
- Server myServer;
- Client myClient;
- void setup() {
- size(200, 200);
- myServer = new Server(this, 5204);
- myClient = new Client(this, "127.0.0.1", 5204);
- }
- void draw() {
- myServer.write(byteBuffer);
- }
- void mousePressed() {
- open("gnuplot -persist -e \"plot sin(x)\"");
- }
1