about module constants values.

iComes nginx-forum at nginx.us
Mon Feb 21 20:24:50 MSK 2011


Thanks for sharing, it's also my question while reading the source : )

Peter Leonov Wrote:
-------------------------------------------------------
> Hi, langwan,
> 
> On 20.01.2010, at 8:36, langwan wrote:
> > 
> > i find these constants, i would like to know the
> laws of the definition of what these values.
> > 
> > because i want to add a core module, like
> NGX_HTTP_MODULE.
> > 
> > #define NGX_CORE_MODULE        0x45524F43  /*
> "CORE" */
> > #define NGX_CONF_MODULE        0x464E4F43  /*
> "CONF" */
> > #define NGX_EVENT_MODULE      0x544E5645  /*
> "EVNT" */
> > #define NGX_HTTP_MODULE        0x50545448   /*
> "HTTP" */
> > #define NGX_MAIL_MODULE         0x4C49414D    
> /* "MAIL" */
> 
> The question got the answer:
> > 0x45524F43  /* "CORE" */
> 
> 0x45524F43 is a 32-bit integer consists of thees
> four bytes: 0x45, 0x52, 0x4F and 0x43 for thees
> characters 'E' 'R' 'O' 'C' (reversed CORE). The
> comment tells what's encoded in integer ;) This
> means that one can define four chars long module
> type identifier. I think that's enough ;)
> 
> Best regards,
> Peter.____________________________________________
> ___
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,43305,177266#msg-177266




More information about the nginx mailing list