httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tamas Palagyi <tamas.pala...@ge.com>
Subject Re: Get the actual socket of a request_rec
Date Thu, 22 Nov 2007 16:05:33 GMT
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

Mime
View raw message