|
Bob,
You do not say what Language, but look at the select() function
it will do what you need here. Either that or set a loop on the read()
function looking for return_code > 0 (# of Bytes).
Jeff S.
On Mon, 7 Jul 1997, Boller, Bob wrote:
> I am attempting to use Windows style sockets to pump data to & fro
> between a Windows 95 application and a server program running on the
> AS400. The sequence is this: I issue a request to the server program
> for a block of records. The server program responds by reading a file
> and placing the requested records into the socket. The client program
> then reads the data from the socket. What appears to be happening is
> that sometimes after sending the request to the server, the client
> attempts to read the data from the socket before the server has had time
> to place the data into the socket. Can anyone suggest how to prevent
> this from happening? It seems like we need some way to tell the client
> program to wait until the data has arrived in the socket. Thanks in
> advance for you help. Bob Boller
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This is the Midrange System Mailing List! To submit a new message, *
> * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from *
> * this list send email to MAJORDOMO@midrange.com and specify *
> * 'unsubscribe MIDRANGE-L' in the body of your message. Questions *
> * should be directed to the list owner / operator: david@midrange.com *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List! To submit a new message, *
* send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from *
* this list send email to MAJORDOMO@midrange.com and specify *
* 'unsubscribe MIDRANGE-L' in the body of your message. Questions *
* should be directed to the list owner / operator: david@midrange.com *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.