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



You shouldn't need to flush a socket.

You didn't describe the problem that you're experiencing, but this might
be what you're seeing:

I believe that the system will delay slightly before sending the data
after you call send(), in order to try to optimize the packets.  If it can
get more data into each packet, then there are fewer packets to send, and
the process is more efficient.

Remember, each packet can have up to 256 bytes of header data in it.   If
you're only sending one byte of data in each packet, it's not very
efficient.

Though, if you're passing large chunks of data when you call the send()
API, this probably isn't going to help you that much.  So, if you want to
disable this optimization, you can use the TCP_NODELAY option in the
setsockopt() API.

I'm not certain about the OS/400 TCP/IP stack, but some TCP/IP stacks will
force any pending output data to be sent as soon as you do a recv().   If
you're doing a recv() right after send your data (which is how most
network programs work) you don't need to flush anything, it gets done for
you.

If none of that helps, then please post an explanation of the problem
you're trying to solve, along with code samples if possible...


On Fri, 31 May 2002, Uwe Heldt wrote:
>
> Hi all,
>
> is it possible to flush an socket output stream with the rpg send command?
>
> Thanks



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.