CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Socket problem


New User

Aug 27, 2008, 1:49 AM

Post #1 of 1 (411 views)
Socket problem Can't Post

Hey everyone,

Im having trouble reading the response from a socket.
here's a bit of code:

my $sock=IO::Socket::INET->new(PeerAddr=>'url', PeerPort=>port, Proto=>'tcp') 


while (!($sock->eof)) {
print sprintf("%s\n", $line);

The message is an xml string and it gives a response, but the problem is, it enters the while and never goes past the getline(); untill the socket times out, or is colsed.

The message comes back ok, but i want to keep the socket open to send another xml string (depending on the response of the first)

anyone know what i could do about this?


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives