Permalink
Browse files

small changes here but tip of the next iceberg of app-level work

  • Loading branch information...
1 parent 0b92250 commit d288621773308c66c3d19bbe618f07a54ccaa9c0 @quartzjer committed Oct 17, 2010
Showing with 31 additions and 4 deletions.
  1. +24 −1 notes.txt
  2. +7 −3 perl/wall_watch.pl
View
@@ -109,4 +109,27 @@ eviction
any missing _pin (never got packets back)
finally, youngest (but older than 60s or so, might be mid-dial?)
-incoming
+incoming
+
+
+--------
+switch as a localhost server on 127.0.0.1:xxxxx port
+ tapping
+ active or one-time
+ explicit or automatic
+ dialing
+ stream or timer
+ signals in
+ only if tap'd?
+ signals out
+ only if recipient?
+ plain js in
+ plain js out (recipient req)
+s-core
+ -dial=5
+ -tap=id track sigs
+ -ipp -nat
+ -new
+ -line=true/false request and status
+ -lend=end for line
+ -retry=3
View
@@ -9,14 +9,17 @@
my $tap = "[{\"is\":{\"+end\":\"$end\"},\"has\":[\"+wall\"]}]";
my %dedup;
+use IO::Handle;
+use IPC::Open2;
use Digest::SHA1 qw(sha1_hex);
use JSON::DWIW;
my $json = JSON::DWIW->new;
my $run = sprintf("./switch.pl -e '%s' -t '%s' |",$end,$tap);
printf "running %s\n",$run;
-open(SWITCH,$run);
-while(<SWITCH>)
+my ($read_fh, $write_fh) = (IO::Handle->new(), IO::Handle->new());
+$pid = open2($read_fh, $write_fh, "./switch.pl","-e",$end,"-t",$tap)||die("oops $!");
+while(<$read_fh>)
{
chop;
my $js = $json->from_json($_);
@@ -30,4 +33,5 @@
}
printf "%s\t%s\n",`date`,$wall;
}
-close(SWITCH);
+close($read_fh);
+close($write_fh);

0 comments on commit d288621

Please sign in to comment.