× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Generally in Sockets C API's you need to null terminate the string.  In
RPGLE you need to append a Null to the end of your string.  Are you sure
they are receiving nulls or some other garbage?  Have them check the hex
codes of the data they are receiving.  You can also check your parm in the
prototype.  Define the variable there as variable length with the option
*STRING.  This tells the compiler to automatically append the Null to the
string.

d Write           PR            10i 0 ExtProc('write')

d                               10i 0 Value
SocketDId
d                                 *   Value
PtrToBuffer
d                                     Options(*string)

d                               10i 0 Value
SizeToRead

Christopher K. Bipes      mailto:ChrisB@Cross-Check.com
Operations & Network Mgr  mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.                  http://www.cross-check.com
6119 State Farm Drive     Phone: 707 586-0551 x 1102
Rohnert Park CA  94928    Fax: 707 586-1884

-----Original Message-----
From: Jim W [mailto:jimw2001@hotmail.com]
Sent: Thursday, October 18, 2001 1:57 PM
To: MIDRANGE-L@midrange.com
Subject: TCP/IP Sockets - Send length problem

We have a sockets application on the AS/400 that is talking to a PC based
application running under Windows sockets.  Our interface is working well,
except for one small problem.  The SocketData field that holds the data
portion of the packet is defined as a variable length field and we specify
the length (%len) of the data string on the send function, but no matter
what we do, we can't get the program to send the actual length of data down
the line.  The customer is getting our data string followed by a bunch of
"@" (nulls) out to the end of the transmission.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.