in reply to Re: Problem Transmitting Data via TCP/IP
in thread Problem Transmitting Data via TCP/IP
Thank you! I knew it had to be something simple like that.
But what do you mean "wrongly coded"? How should htonl() be defined?
When I change my code to this:
# $socket->send( htonl($request_length) ) or die "3a Couldn't write + to socket: $!"; $socket->send( pack('l>',$request_length) ) or die "3a Couldn't wr +ite to socket: $!"; $socket->send( $request ) or die "3b Couldn't write to socket: $!" +;
I get the expected output in the logging console, and the server seems to write the response to the socket, but my client fails to read the response from the socket.
I get this message now:
5 Couldn't read data from server:
So something is still not quiet right... but I'm getting closer!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Problem Transmitting Data via TCP/IP
by BrowserUk (Patriarch) on Aug 09, 2012 at 19:33 UTC | |
by scorpio17 (Canon) on Aug 09, 2012 at 20:12 UTC |
In Section
Seekers of Perl Wisdom