in reply to Re: Telnet, XML API, and I/O Buffering
in thread Telnet, XML API, and I/O Buffering

I do have that book, and have tried to use the Msg module, but have met with slightly different results now... details below:

First, the new code I am using:

use Msg; my $conn = Msg->connect($WYSHOST, $WYSPORT); die "Couldn't connect to $WYSHOST on $WYSPORT" unless $conn; $conn->send_now($NODEREC); $conn->send_now("\n"); ($res, $err) = $conn->rcv_now(); print Dumper($res), "\n"; print Dumper($err), "\n";
and the results end up with $res and $err both being '':
$VAR1 = ''; $VAR1 = '';

Should I view this as an error in the part f sending over the XML record that requests the data from the application? Or as some strange buffering issue on hte receiving host's side?

again, many thanks in advance for all the help so far.

Replies are listed 'Best First'.
Re^3: Telnet, XML API, and I/O Buffering
by ivo_ac (Acolyte) on Jul 30, 2010 at 20:30 UTC

    Hi,

    Did you implement the Msg toolkit on the sending side as well or only on the receiving side ?

    It has to be implemented on both sides because it enforces a kind of protocol. For example, one of the protocol requirements is that the server has to mark the beginning of each message with a four byte message length otherwise the rcv_now sub (which calls _rcv) doesn't work correctly.

    Hope this helps.