Web lists-archives.com

Re: Unable to Accept TCP Connection

R0b0t1 wrote:
The following never prints "Hello, world!"

struct sboot_state {
    struct sockaddr_in haddr;
    struct sockaddr caddr;
    socklen_t clen;
    int sfd, cfd;
} state = { 0 };

state.haddr.sin_family = AF_INET;
state.haddr.sin_port = 2200;

You can use the Windows 'netstat' to see listening connections. See if your app shows up on port 2200. But I suspect you need an htons(2200) on the assignment to sin_port.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple