{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1753164585,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"1b86380ce6c7b92feadf80a1a168399c",
"commit": {"type":"commit",
"time": 1584253338,
"time_ofs": 0,
"oid_tree": { "oid": "4d7cb35d188df80bde4e204c015819a9c452ecac", "alias": []},
"oid":{ "oid": "f843668db99444e1cc7a070662a9dcb51901ff9d", "alias": []},
"msg": "ss: add lws_ss_to_user_object",
"sig_commit": { "git_time": { "time": 1584253338, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1584247230, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "ss: add lws_ss_to_user_object\n\nThe ss handle is opaque, so if you need to get the user allocation from the handle\noutside of a callback, a helper is needed.\n\nABI change."
,
"diff": "diff --git a/include/libwebsockets/lws-secure-streams.h b/include/libwebsockets/lws-secure-streams.h\nindex f0b2b40..eafdb13 100644\n--- a/include/libwebsockets/lws-secure-streams.h\n+++ b/include/libwebsockets/lws-secure-streams.h\n@@ -421,6 +421,18 @@ LWS_VISIBLE LWS_EXTERN struct lws_context *\n lws_ss_get_context(struct lws_ss_handle *h);\n \n /**\n+ * lws_ss_to_user_object() - convenience helper to get user object from handle\n+ *\n+ * \u005cparam h: secure streams handle\n+ *\n+ * Returns the user allocation related to the handle. Normally you won't need\n+ * this since it's available in the rx, tx and state callbacks as \u0022userdata\u0022\n+ * already.\n+ */\n+LWS_VISIBLE LWS_EXTERN void *\n+lws_ss_to_user_object(struct lws_ss_handle *h);\n+\n+/**\n * lws_ss_rideshare() - find the current streamtype when types rideshare\n *\n * \u005cparam h: the stream handle\ndiff --git a/lib/secure-streams/secure-streams.c b/lib/secure-streams/secure-streams.c\nindex b93158a..3c8eff3 100644\n--- a/lib/secure-streams/secure-streams.c\n+++ b/lib/secure-streams/secure-streams.c\n@@ -480,6 +480,12 @@ lws_ss_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi,\n \treturn 0;\n }\n \n+void *\n+lws_ss_to_user_object(struct lws_ss_handle *h)\n+{\n+\treturn (void *)\u0026h[1];\n+}\n+\n void\n lws_ss_destroy(lws_ss_handle_t **ppss)\n {\n","s":{"c":1753164585,"u": 3161}}
],"g": 3993,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}