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



Scott - two more questions:

In your prior response you stated:

"Don't write your application in a manner that expects data to arrive in a
fixed-length chunk. That's not how TCP was intended to work! Think of
the data as a continuous stream, depending on the speed of the computer,
how busy it is, how fast the network is, etc, you will receive different
lengths at different times. It's no big deal, just call recv() in a loop
until you get the total size you need."

My application is server side. The client will always be sending variable
length data. Probably in the range of less than 1k an up to perhaps 4k.

Since my buffer may only provide the first 1392 bytes (out of the total
1869 bytes which composes my first complete message), I can do the read in
a loop and look for CRLF. Once I detect CRLF, I need to send an
acknowledgement string back to the client. If the socket stream/buffer(?)
from my subsequent read contains data that belongs to a new message (to be
processed after sending the acknowledgement to the client), will my write
operation back to the client overlay the existing data received by the
last read? Or are the read and write buffers separated as to prevent
collision?

Also when I read (into a variable length field), my first two bytes are
missing. I suspect that those first two bytes are the representation of
the length of the data. But I can't for the life of me manipulate the data
to get it to start at the actual beginning of the data.


Regards, Jerry

Gerald Kern - MIS Project Leader
Lotus Notes/Domino Administrator
IBM Certified RPG IV Developer
The Toledo Clinic, Inc.
4235 Secor Road
Toledo, OH 43623-4299
Phone 419-479-5535
gkern@xxxxxxxxxxxxxxxx


This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized use, disclosure or distribution is
prohibited. If you are not the intended recipient, please inform the
sender by reply e-mail and destroy this and all copies of this message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.