Welcome! Log In Create A New Profile

Advanced

how to define a struct that only need one time initialization and used for every request

Walter Chang
July 21, 2012 06:38PM
Hi ,

I'm new to server development. I have a c++ struct that need to be
initialized once from file and it will be used in each request since the
data it has is read only. I'm not sure what's the best practice to define
that struct in nginx module.

Shall I put it in the module loc config or just define it as a global
variable ?

Thanks,

Weide
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to define a struct that only need one time initialization and used for every request

Walter Chang July 21, 2012 06:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 198
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready