From modules-dev-return-1281-apmail-httpd-modules-dev-archive=httpd.apache.org@httpd.apache.org Thu Nov 22 16:11:13 2007 Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 47556 invoked from network); 22 Nov 2007 16:11:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Nov 2007 16:11:13 -0000 Received: (qmail 6497 invoked by uid 500); 22 Nov 2007 16:11:00 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 6484 invoked by uid 500); 22 Nov 2007 16:11:00 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 6469 invoked by uid 99); 22 Nov 2007 16:11:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2007 08:11:00 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of giovanni.donelli@gmail.com designates 209.85.198.186 as permitted sender) Received: from [209.85.198.186] (HELO rv-out-0910.google.com) (209.85.198.186) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2007 16:10:50 +0000 Received: by rv-out-0910.google.com with SMTP id l15so2109056rvb for ; Thu, 22 Nov 2007 08:10:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=yqkRaIzVpnbPUXdxWQ+F8FJEj9eXWOwZ8Cvby0JSPY8=; b=THiO259dfks266nWBhnvWqS0RLysurcscoFmZTv0zDTYy/cfinYIcrH+ACLyzV9AxhVwhKYRN/m1ZJSWRRV3+lLRfYzK7UCxjsDlJnwR421/gdlNlaZ5lO1gCNdQFVpwdPj0eU3tGWd6hzmudT1gYv7H0ZAJ6adBfNdI8bdanws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eFFgbV2Bl19tiih3JWIGGfbpDHgLvdSr3bHMMGsuHmkZp7cX4cGkfpsaJNtKPvrkoVXH6n6gPHC71g5rjBhxmzyGrZW3G7gunZPGdjVCSMiwL0TthhBXBUWuIlE1B+X6+7BWiyYCZOWB3C5vtsdILklAn4jp5GYrplqIkHj9mAo= Received: by 10.114.202.15 with SMTP id z15mr585850waf.1195747843542; Thu, 22 Nov 2007 08:10:43 -0800 (PST) Received: by 10.115.108.3 with HTTP; Thu, 22 Nov 2007 08:10:43 -0800 (PST) Message-ID: Date: Thu, 22 Nov 2007 16:10:43 +0000 From: "Giovanni Donelli" To: modules-dev@httpd.apache.org Subject: Re: Get the actual socket of a request_rec In-Reply-To: <1195747533.18096.69.camel@kismokus.e2k.ad.ge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1195747533.18096.69.camel@kismokus.e2k.ad.ge.com> X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much, what is the core_module symbol referencing to? I can't compile it without binding that to something. Giovanni On Nov 22, 2007 4:05 PM, Tamas Palagyi wrote: > Try this: > > struct apr_socket_t_internal { > > apr_pool_t *pool; > int socketdes; > }; > > int getfd(request_rec *r) { > > conn_rec *c = r->connection; > apr_socket_t *s = ap_get_module_config(c->conn_config,&core_module); > struct apr_socket_t_internal *i = (struct apr_socket_t_internal *) s; > > return i->socketdes; > } > > I have seen somewhere some other way to get fd tough... > > Tamas > > > > > On Thu, 2007-11-22 at 15:44 +0000, Giovanni Donelli wrote: > > Dear fellow module developer, > > > > given a request_rec*r is there anyway to get to the actual socket > > file descriptor from which the request came in? > > > > I have been struggling all day trying to get this info out of a > > request_rec. Please help! > > > > Thank you! > > Giovanni >