X-Spam-Check-By: sourceware.org
Date: Thu, 8 Mar 2007 14:39:50 -0800
From: Nathan Myers <ncm@cantrip.org>
To: cygwin@cygwin.com
Cc: Nathan Myers <ncm@tofu.dreamhost.com>
Subject: a better socketpair
Message-ID: <20070308223950.GK14344@cantrip.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hi all,

I did my first bit of coding on win32 last month, and was disgusted
to find no socketpair.  Cygwin's socketpair (at least the version I
found) seems to use _pipe underneath, which as I understand it is not
suitable as an argument to select().  So, I wrote my own:

  http://cantrip.org/socketpair.c

which as you may observe is licensed compatibly with cygwin.

Use it if you like, with whatever argument-list changes it needs to 
conform to POSIX.  (Apparently AF_LOCAL/PF_LOCAL, normally passed to 
socketpair, isn't defined in win32, but I presume cygwin can supply 
that.)

I'm not subscribed to this list, so copy to me anything you think
I should see.  I would welcome notes hinting at which release of 
cygwin this gets installed in, if any (e.g. "I put it in today") 
and any problems encountered.

Nathan Myers
ncm@cantrip.org

--
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/

