user_ctx vs sess_ctx in http server

rokko1337
Posts: 3
Joined: Fri Jan 22, 2021 8:53 pm

user_ctx vs sess_ctx in http server

Postby rokko1337 » Tue Oct 04, 2022 2:20 pm

What is the main difference between user_ctx and sess_ctx? Is sess_ctx different for each session/connection and user_ctx is not, in this case what is the point of user_ctx and in which scenario you recommend to use it? In restful_server example it's used to store server response, but why you can't respond directly with httpd_resp_send()? Also in which cases ws_user_ctx is used and what I should use to store user data (for example access role) for each WebSocket connection?

Who is online

Users browsing this forum: No registered users and 119 guests