|
> The communication is in fact between 2 servers on the same iSeries where > one acts as a client to the other. The client socket does a Select() and > a Read() but the Read() is reported to be returning without any error or > data even though the socket at the other end can be to be still > processing the request. What are the parameters you're sending to select()? Is it possible that the select() is completing because of something other than a "socket is readable" condition? I'm not totally clear on what you mean when you say the socket on the other end is still processing the request. Do you mean it's still sending data? If so, it's normal for one side of the socket to start receiving data before it's all written, assuming you're using a stream socket (SOCK_STREAM) If you're saying that the other side is processing a previous command that was sent by a client, and has not yet written any data back, then I'd guess that the select() is returning prematurely, and that you're using non-blocking sockets, so read() is also returning immediately. > What to do? Is it possible to do a communications trace between 2 such > sockets? I usually use a packet sniffer for such things, but if the two apps are on the same system, that'll be difficult :) You might try using a proxy as a go between, and logging the data to the proxy, and/or simply testing each side of the connection manually with a telnet client, and see if you can spot the error with that. Those are the tricks that I use.
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.