|
From: Scott Klement
If you're reading into an RPG VARYING field you need to follow these
steps:
a) Set the field to it's maximum length before calling the recv() API.
Generally the code to do that looks like this:
%len(Field) = %size(Field) - 2;
b) Call the recv() API, but pass the address of the DATA, not the
address of the length. Basically, add 2 to the adddress. Typically,
you'd code it as follows:
len = recv(mySock: %addr(Field)+2: %len(Field): 0);
len = recv(mySock: %addr(Field)+2: %size(Field)-2: 0);
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.