Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Todd Rearick Subject: Re: Socket read problem on Windows XP Pro & Cygwin Date: Sat, 22 Oct 2005 14:41:39 +0000 (UTC) Lines: 60 Message-ID: References: <20051022035348.RADA2767.eastrmmtao03.cox.net@[172.18.52.8]> <4359C50C DOT 76649CA1 AT dessent DOT net> <20051022090719 DOT GB27476 AT calimero DOT vinschen DOT de> <20051022135748 DOT GA4194 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Corinna Vinschen cygwin.com> writes: > > This I can't tell you since I don't know the server side of the > connection. It's normal to get EOF (== 0) over and over again if EOF > has been detected. This behaviour can be observed on, for instance, > Linux, too. Well..I thought it shouldn't if it's set for blocking mode (which is the default I think).....but *now* I see why... SEE #3 BELOW: > > FYI, I tried your application against a simple time server, port 37, > which is known to accept a connection, sends 4 bytes and then closes the > connection. > Good idea. FYI, the server program I am trying to run is a virtual serial port program at this url: http://www.hw-group.com/products/hw_vsp/index_en.html Thanks for the input...and I think I am making headway with this help. After some more testing...I now think the problem has nothing directly to do with cygwin or my program. Here's why: 1.) Using a time server as the server always works...no matter where I run the client program. 2.) I now have 2 PC's that fail, and one that doesn't. If I run the client on the PC's that fail, and I run the "hw-group" server program ANYWHERE, the client fails to receive data. 3.) If I run some *other* client software on the PC's that fail (telnet...hyperterm....etc...) and try to connect to the "hw-group" server (no matter where that server is running), that also fails. Those programs report that the server ended the connection. THAT's why read returns 0...because it *thinks* the server closed the connection. 4.) Lastly, all client programs (telnet, my program, hyperterm..etc...) all work properly with the "hw-group" server when those programs are run on the "working" PC (my laptop). So...it looks to me like there is some kind of basic incompatibility between the "hw-group" server program (no matter where it is run) and the winsock code on the client PCs that fail....since the problem seems to affect both windows and cygwin clients alike. Doesn't look like this really has anything to do with cygwin. One of the client PC's that fails is still only SP1 of XP. The other is SP2....maybe I'll try and update the SP1 machine to the latest and see what happens. Thanks for all of your help. Unfortunately...now the problem isn't really directly under my control...hope I can find a solution. Todd -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/