|
From: | lingweicai |
Subject: | [libmicrohttpd] Can I define variable of char array for a page in the function containing MHD_create_response_from_buffer with the flag of MHD_RESPMEM_PERSISTENT |
Date: | Thu, 17 Nov 2022 21:24:22 +0800 (CST) |
Hello Experts,
I am developing a web tool, Can I define variable of char array for a page in the function containing MHD_create_response_from_buffer, with flag of MHD_RESPMEM_PERSISTENT? or I must use the flag of MUST_COPY ?
for example:
send_page ( char * str )
{
char page[1024];
strcpy ( page, str);
response = MHD_create_response_from_buffer ( strlen(page), (void*) page, MHD_RESPMEM_PERSISTENT ) ;
...
}
or use this :
static char page[1024];
in multiple threads pool mode ?
Thanks,
Forrest weicai Ling
[Prev in Thread] | Current Thread | [Next in Thread] |