in reply to Re^4: Tk Realtime data aquisition
in thread Tk Realtime data aquisition
And it works, data comes across the socket, and shows up in the command window. I do think the problem is in the fileevent. But, I can do the read like I did in my small script, but how do I pass what is read to TK and then use it within its subroutines to build the graph?#!/usr/bin/perl use IO::Socket; my $sock = new IO::Socket::INET ( LocalHost => 'localhost', LocalPort => '7070', Proto => 'tcp', Listen => 1, Reuse => 1, ); die "Could not create socket: $!\n" unless $sock; my $new_sock = $sock->accept(); while(<$new_sock>) { print $_; } close($sock); __END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Tk Realtime data aquisition
by zentara (Cardinal) on May 09, 2009 at 11:00 UTC |