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



Are you sure you are clearing your send buffer completely between sends?  I
have seen people miss the first byte before thus end up with x'0B0B' in the
buffer.

-----Original Message-----
From: GKern@xxxxxxxxxxxxxxxx

I'm experiencing a problem while sending data through a socket and am not 
sure how to proceed to correct it.

I have a physical file, from which I read at least 2 but not more than 8 
records to construct a data structure that is to be sent through the 
socket.

The data structure (socket data variable) is constructed similar to the 
example that follows:

A hex code start_block of    x'OB', 
followed by a record from the physical file (translated to ascii), 
followed by a carriage return x'0D'
followed by a record from the physical file (translated to ascii), 
followed by a carriage return x'0D'
followed by a record from the physical file (translated to ascii), 
followed by a carriage return x'0D'
followed by a record from the physical file (translated to ascii), 
followed by a carriage return x'0D'
followed by a record from the physical file (translated to ascii), 
followed by a carriage return x'0D'
followed by a record from the physical file (translated to ascii), 
followed by a carriage return x'0D'
followed by end_block   x'1C'
followed by a carriage return x'0D' 
 
The only data translated to ascii is the data from the physical file. 

For some reason, when I send the variable containing this string the 
start_block x'0B' appears to be received by the server twice. My program 
only refers to this field once to define the constant, and once to insert 
it at the beginning of the variable being sent.

The data in the phsical file is correctly formatted in every record so I 
know the problem isn't in the physical file.

Funny thing is, it doesn't happen every time and that's why I'm stumped. 
Out of 2350 sends, 26 exhibit this problem. I tried the send a couple of 
times and it's the same ones that generate this problem. That leads me to 
conclude the bug is in my program, I've viewed the data in debug mode, and 
it has the same start_Block, data, end_block, carriage return 
characteristics in both acceptable and rejected variables just before it's 
sent.

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.