From owner-freebsd-hackers Tue May 27 08:24:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA17597 for hackers-outgoing; Tue, 27 May 1997 08:24:29 -0700 (PDT) Received: from mailer.syr.edu (mailer.syr.edu [128.230.20.20]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA17588 for ; Tue, 27 May 1997 08:24:26 -0700 (PDT) Received: from rodan.syr.edu by mailer.syr.edu (LSMTP for Windows NT v1.1a) with SMTP id <0.8955AEA0@mailer.syr.edu>; Tue, 27 May 1997 11:24:27 -0400 Received: from localhost (cmsedore@localhost) by rodan.syr.edu (8.8.5/8.8.5) with SMTP id LAA11969 for ; Tue, 27 May 1997 11:24:22 -0400 (EDT) X-Authentication-Warning: rodan.syr.edu: cmsedore owned process doing -bs Date: Tue, 27 May 1997 11:24:22 -0400 (EDT) From: Christopher Sedore X-Sender: cmsedore@rodan.syr.edu To: FreeBSD-Hackers@FreeBSD.ORG Subject: async socket stuff In-Reply-To: <19970527090941.33299@right.PCS> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I've been thinking about implementing some async socket handling code and am wondering if someone else is doing this or has done it. I've been thinking about two different approaches: 1. Creating a new ioctl set and a few syscalls to allow you to associate a socket with something like an NT I/O completion port. This would allow you to associate a socket descriptor with a queue and each time the socket's status changed (via sorwakeup or sowwakeup) I'd post an entry into the queue. The idea is that rather than using select() and then searching through a list of descriptors, you could just read them off one (or many) at a time and do I/O on the appropriate descriptors. This seems to me to be more efficient than select(). 2. Implementing general async I/O for sockets. Then, rather than (or perhaps in addition to) the above functionality, you could use the queue to hold results of async operations. I've also thought of adding a call like NT's TransmitFile() (single call file transfer). Comments? Suggestions? Criticisms? -Chris