As per my subject, I'm having some difficulty reconciling what the
requirements are for establishing communications with the testserver
(horizon.opensrs.net:55000).  Even with the latest revision of the ApiDocs,
there are glaring contradictions as to how data exchange needs to take
place.

The docs say that in addition to the "Content-Length: x" header, all "lines"
of data (we'll assume those terminated with a \r\n) need to be prepended
with a byte count of the string.  The byte count itself must be in
network-order.

Fair enough, but when one looks at the PERL script (OPS.pm) for writing data
to a socket, we see:

sub write_data {
        my ( $self, $fh, $msg ) = @_;
        my ( $len );
        $len = length $msg;
        local $SIG{PIPE} = 'IGNORE';
        # WRITE HEADERS #
        print $fh "Content-Length: $len", $CRLF, $CRLF;
        # WRITE DATA #
        print $fh $msg;
}

No prepending!

The reason I ask is that I am currently getting stalled at the
Authentication Request phase of handshaking.  I send the request and the
server just times out.  All XCP messages are as per the documentation
(spotty as it is).  Can anyone shed light on this?

Cheers,

__________________________________________
Chris R Chapman,
Software Development Consultant
2608-265 Balliol St., Toronto, ON M4S 1C9
(416)-994-7266
[EMAIL PROTECTED]

Reply via email to