Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
Fork
libwebsockets
Commits
3f62870e
This project is archived. Its data is
read-only
.
Commit
3f62870e
authored
Dec 13, 2015
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
introduce lws_wsi_user
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
1a366bf9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog
+4
-1
4 additions, 1 deletion
changelog
lib/libwebsockets.c
+6
-0
6 additions, 0 deletions
lib/libwebsockets.c
lib/libwebsockets.h
+3
-0
3 additions, 0 deletions
lib/libwebsockets.h
with
13 additions
and
1 deletion
changelog
+
4
−
1
View file @
3f62870e
...
...
@@ -4,7 +4,7 @@ Changelog
User api additions
------------------
lws now exposes his internal platform file abstraction in a way that can be
1)
lws now exposes his internal platform file abstraction in a way that can be
both used by user code to make it platform-agnostic, and be overridden or
subclassed by user code. This allows things like handling the URI "directory
space" as a virtual filesystem that may or may not be backed by a regular
...
...
@@ -45,6 +45,9 @@ lws_plat_file_write(struct lws_plat_file_ops *fops, lws_filefd_type fd,
The user code can also override or subclass the file operations, to either
wrap or replace them. An example is shown in test server.
2) A new API void * lws_wsi_user(struct lws *wsi) lets you get the pointer to
the user data associated with the wsi, just from the wsi.
User api changes
----------------
...
...
...
...
This diff is collapsed.
Click to expand it.
lib/libwebsockets.c
+
6
−
0
View file @
3f62870e
...
...
@@ -941,6 +941,12 @@ lws_get_ctx(const struct lws *wsi)
return
wsi
->
context
;
}
LWS_VISIBLE
LWS_EXTERN
void
*
lws_wsi_user
(
struct
lws
*
wsi
)
{
return
wsi
->
user_space
;
}
#ifdef LWS_WITH_OLD_API_WRAPPERS
/*
...
...
...
...
This diff is collapsed.
Click to expand it.
lib/libwebsockets.h
+
3
−
0
View file @
3f62870e
...
...
@@ -1414,6 +1414,9 @@ lws_service_fd(struct lws_context *context,
LWS_VISIBLE
LWS_EXTERN
void
*
lws_context_user
(
struct
lws_context
*
context
);
LWS_VISIBLE
LWS_EXTERN
void
*
lws_wsi_user
(
struct
lws
*
wsi
);
/*
* NOTE: These public enums are part of the abi. If you want to add one,
* add it at where specified so existing users are unaffected.
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment