× 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.



Is the length field (the first 10 bytes) an integer type or character type?
If it is an integer type, you cannot run it thru the ascii/ebcdic coverted.
Integer is in binary form, you must send it as it. Please double check the
protocol....

Note: Although, I must say, 10 bytes is a strange size for an interger type.


"Versfelt, Charles" <CVERSFELT@xxxxxxxxx> wrote in message
news:mailman.31822.1299082852.2702.midrange-l@xxxxxxxxxxxx...
Eric,

Thanks for your reply. There's no End of Record, but the first ten bytes of
the reply contains the length of the rest of the reply. So I can continue
receiving until I reach the reply length. It should be no problem to code
it to do that.

First though I have to get it to send me a valid reply, which I believe
means getting through those invalid characters.

I noticed that my last message to this group, the e-mail changed the weird
characters to question marks.

The message from the server:

02/Mar/2011:09:17:15:609 -0500;4364;9;DICom.cpp;InOutProc;INFO;Server could
not send data on the socket;ERRCODE|001000011|ERRMSG|Validation of message
failed : ????????????O0000000151RATE|

Those question marks on the actual server look like foreign characters.
("O"s with accents or two dots over them.)
The characters aren't in the variable that I send in, as far as I can
tell... But the server on the other side is seeing them.

Oddly, the server isn't even sending me ERRCODE|001000011|ERRMSG| which is
what I'd expect as a reply if that was the main problem. The server is
sending me a short string of zeros, 00000000 as my entire reply.

Thanks again,
Charlie



RE: Sockets program adding characters?


Charles,

Your RecvAscii should loop over recv() until you have a complete message.
All the parts may not make it across the >network at the same time, so your
receiver must be patient.

Do you have some sort of EndOfRecord that you can watch for? Simplest
approach here is to receive one byte at a >time, append it to your "receive
buffer" while watching for your end of record character...

Hth,
-Eric DeLong=



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.