OpenSRS API Integration for XML
OpenSRS API Integration for XML
OpenSRS API Integration for XML
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
catch (TaskExecuteException e) {<br />
}<br />
e.printStackTrace();<br />
}<br />
}<br />
Data exchange<br />
For each line of data passed, you must prepend the data with the length of<br />
the string packed in 'network' or big-endian order. In Perl, this is<br />
accomplished by:<br />
$length = pack('n', length($data));<br />
Where $data is the in<strong>for</strong>mation you are going to send.<br />
For example, assuming you have a socket SERVER already open to the<br />
server process, you could send data as follows:<br />
print SERVER pack('n', length($data));<br />
print SERVER $data;<br />
Since you must always send the length of the string first, it will not work to<br />
simply telnet to the <strong>OpenSRS</strong> server and begin issuing commands.<br />
Authentication handshake<br />
The first step in communicating with the server process is the authentication<br />
handshake. This proceeds between the Reseller Client and Reseller Agent<br />
(server) as follows:<br />
Process<br />
Description<br />
1 Reseller Client Initiates connection with Reseller Agent (server<br />
process) on a specific TCP/IP hostname:port.<br />
Horizon: horizon.opensrs.net:55000<br />
Live: rr-n1-tor.opensrs.net:55000