libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Can I define variable of char array for a page in the fu


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








reply via email to

[Prev in Thread] Current Thread [Next in Thread]