X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: Winsock Date: Thu, 7 Dec 2006 20:41:01 -0000 Message-ID: <002901c71a40$03348070$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4578699D.5040605@comcast.net> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On 07 December 2006 19:21, Lucas Charron wrote: > I can connect to my listening socket from within the > same process and transmit data to and from the "server" and "client", > but, if I try to use a web-browser, I get "This connection was denied" > and the server application has no notification of anything even trying > to connect. I've checked all of windows' firewall settings (firewall is > disabled). I've also tryed binding to my external IP and to my loopback. > I've tryed binding to "0.0.0.0". Somewhere, my connection is being > rejected. I've checked the windows log files for dropped packets, and > nothing. I'm at my wits end. > All sockets functions return normally, there are no errors that windows > is reporting. This is either a Windows or Cygwin problem, but I can't > figure it out. There is no such thing as a per-process socket, so that can't be the cause directly. I suggest you a) look at the netstat output to make sure that the socket you think is there and listening is valid and b) try to connect with something simple like telnet or netcat rather than a browser. The most likely explanation for this behaviour is that you've got the wrong endianness somewhere in your code when you setup the inetaddrs. Within the same process, you've got the same code, so the server is listening on whichever numbered port you get if you byteswap (unsigned short)80, and the client that tries to connect tries to connect to that port, whereas when you try it with a real browser it tries to get to the real port 80 and finds nothing there listening. You must use htonX when entering values directly into an inetaddr. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/