diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-11-01 16:31:59 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-11-01 16:31:59 -0300 |
commit | 0e9c6dd6196594da49bec4a6caea4d0886b54602 (patch) | |
tree | 24a348d46b38e97cb325fc1af1e02ff881db88e3 /dpid/dpidc | |
parent | 3640d724b5073ed6ecb10b8c6ba4a68c9d78749a (diff) |
Made dpidc a C language program
Diffstat (limited to 'dpid/dpidc')
-rw-r--r-- | dpid/dpidc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/dpid/dpidc b/dpid/dpidc deleted file mode 100644 index 7f8bc0e6..00000000 --- a/dpid/dpidc +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -w -# Author: Ferdi Franceschini -# -# dpid control program -# Currently allows -# register: Tells dpid to register all available dpis -# stop: Stops dpid. - -use strict; -use IO::Socket::INET; - -# Get socket directory name -#open(DSD, "<$ENV{HOME}/.dillo/dpi_socket_dir"); -#my $dir = <DSD>; -#close(DSD); - -# Get dpid's listening port from saved file -open(DSD, "<$ENV{HOME}/.dillo/dpid_comm_keys"); -my $port = <DSD>; -close(DSD); -print "Got: localhost:$port\n"; - -my $socket = IO::Socket::INET->new(Peer => "localhost:$port", Type => SOCK_STREAM, Timeout => 1000 ) or die "new: $@"; - -$socket->autoflush(1); - -my %dpi_command = ( - "register" => "<dpi cmd='register_all' '>", - "stop" => "<dpi cmd='DpiBye' '>", - ); - -if ( $#ARGV == 0 && exists($dpi_command{$ARGV[0]}) ) { - print $socket $dpi_command{$ARGV[0]}; -} else { - close($socket); - print "Usage: dpidc register|stop\n"; -} |