delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/10/06:44:05

From: lane AT netti DOT fi (Sami Laine)
Subject: accept() and other networking functions?
10 Dec 1997 06:44:05 -0800 :
Message-ID: <199712101423.QAA27619.cygnus.gnu-win32@sokrates.netti.fi>
Reply-To: lane AT netti DOT fi
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hello.

I'm having some trouble with accept() under Win95. I use gnu-win32 b18
release from ftp.cygnus.com.

Problem I'm having is the fact that accept() fails to function and
always returns -1. Same source is working nicely under Debian/GNU Linux
and NetBSD-1.1.

Are there any special tricks to get accept() working normally?

Usual bind(), socket() stuff done before this.

--- snip ---
        while(1) {
                i = sizeof(sin);
                cli_sock =
                        accept(serv_sock, (struct sockaddr *) &sin, (int *)&i);
                if(cli_sock == -1 && errno == EINTR)
                        continue;

                if(cli_sock == -1)
                        return EXIT_FAILURE;
--- snip ---

-- 
Sami Laine

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019