From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 03:51:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A761065670 for ; Mon, 9 Apr 2012 03:51:19 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail2.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id A38848FC0A for ; Mon, 9 Apr 2012 03:51:19 +0000 (UTC) Received: from localhost (pool-74-102-30-128.nwrknj.fios.verizon.net [74.102.30.128]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id 99DD5130393 for ; Mon, 9 Apr 2012 12:33:32 +0900 (JST) Date: Sun, 8 Apr 2012 23:33:24 -0400 From: Yoshihiro Ota To: freebsd-hackers@freebsd.org Message-Id: <20120408233324.77d24491.ota@j.email.ne.jp> In-Reply-To: References: <0D2E65B3D0AB4A6483C26A613FC73F83@dudu.ro> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Socket buffer usage X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2012 03:51:19 -0000 On Sun, 8 Apr 2012 01:01:01 +0200 Ivan Voras wrote: > On 7 April 2012 23:36, Vlad Galu wrote: > > This might not exactly be what you want, but struct kevent has a member called "data" which, > > for sockets and pipes, returns the number of available bytes to read (or write) for EVFILT_READ > > (or EVFILT_WRITE) events. > > > > That's a good idea but I'm actually trying to find out why my write > events are not firing, so I can't get to that information. Do you happen to use 2 TCP connections in threaded client/server programs: one for reading only and the other for writing only? If so, I observed such behavior in several years ago and can give you a hint. Hiro