Hi,

We use a small perl script to exchange data between a webserver and an 
application server. I was looking to change this to Delphi. Can someone give 
a hint how to do this the best way using the ICS components?

Best regards, Albert Drent
university of Groningen

use IO::Socket;
#
# To let this script work, please replace the PeerAddr by the
# correct application server ip address (default 'localhost') and replace
# the PeerPort by the correct application server port
#
$envString=GetEnvVariables();
$remote=IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>'127.0.0.1', 
PeerPort=>'1099') or ShowError("[1099] Can't connect to server");
$remote->autoflush(1);
binmode($remote);
#
# Send data to the application server
#
print $remote $envString;
#
# Retrieve data from the application server and send it back to
# the web-server
#
binmode($remote);
binmode(STDOUT);
while(<$remote>){join print;
}
#
# ok... all done!
#
close($remote);
#
# e n d   o f   p r o g r a m
#
# 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to