diff options
author | Karl Berry <karl@freefriends.org> | 2009-01-30 00:33:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-01-30 00:33:26 +0000 |
commit | a5df6b939c049edcc1fcd805b056a002904f6aea (patch) | |
tree | b8725970f457042e324911da4c06732dea9def39 /Master/tlpkg/installer/perllib/Win32/Server.pl | |
parent | 233e8430afec69ca29c28c798cc0912785ea29d1 (diff) |
add everything from tlperl/lib to installer/perllib except for Tk, unicore, and auto (report from Gregor Zimmermann, 29 Jan 2009 12:38:19)
git-svn-id: svn://tug.org/texlive/trunk@12015 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/perllib/Win32/Server.pl')
-rw-r--r-- | Master/tlpkg/installer/perllib/Win32/Server.pl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/tlpkg/installer/perllib/Win32/Server.pl b/Master/tlpkg/installer/perllib/Win32/Server.pl new file mode 100644 index 00000000000..ecfb91ba864 --- /dev/null +++ b/Master/tlpkg/installer/perllib/Win32/Server.pl @@ -0,0 +1,48 @@ +use strict; +use Win32::Pipe; + +my $PipeName = "TEST this long named pipe!"; +my $NewSize = 2048; +my $iMessage; + +while () { + print "Creating pipe \"$PipeName\".\n"; + if (my $Pipe = new Win32::Pipe($PipeName)) { + my $PipeSize = $Pipe->BufferSize(); + print "This pipe's current size is $PipeSize byte" . (($PipeSize == 1)? "":"s") . ".\nWe shall change it to $NewSize ..."; + print +(($Pipe->ResizeBuffer($NewSize) == $NewSize)? "Successful":"Unsucessful") . "!\n\n"; + + print "\n\nR e a d y f o r r e a d i n g :\n"; + print "-----------------------------------\n"; + + print "Openning the pipe...\n"; + while ($Pipe->Connect()) { + while () { + ++$iMessage; + print "Reading Message #$iMessage: "; + my $In = $Pipe->Read(); + unless ($In) { + print "Recieved no data, closing connection....\n"; + last; + } + if ($In =~ /^quit/i){ + print "\n\nQuitting this connection....\n"; + last; + } + elsif ($In =~ /^exit/i){ + print "\n\nExitting.....\n"; + exit; + } + else{ + print "\"$In\"\n"; + } + } + print "Disconnecting...\n"; + $Pipe->Disconnect(); + } + print "Closing...\n"; + $Pipe->Close(); + } +} + +print "You can't get here...\n"; |