Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
eabed8de
Commit
eabed8de
authored
11 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
protocol struct add user controlled id member
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
afa10d5a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog
+5
-0
5 additions, 0 deletions
changelog
lib/libwebsockets.h
+7
-0
7 additions, 0 deletions
lib/libwebsockets.h
with
12 additions
and
0 deletions
changelog
+
5
−
0
View file @
eabed8de
...
...
@@ -11,6 +11,11 @@ There's a new member in the info struct used to control context creation,
ssl_private_key_password, which allows passing into lws the passphrase on
an SSL cetificate
There's a new member in struct protocols, id, which is ignored by lws but can
be used by the user code to mark the selected protocol by user-defined version
or capabliity flag information, for the case multiple versions of a protocol are
supported.
v1.3-chrome37-firefox30
=======================
...
...
This diff is collapsed.
Click to expand it.
lib/libwebsockets.h
+
7
−
0
View file @
eabed8de
...
...
@@ -863,6 +863,12 @@ typedef int (extension_callback_function)(struct libwebsocket_context *context,
* protocols where you stream big blocks, set to nonzero and use
* the return value from libwebsocket_write() to manage how much
* got send yourself.
* @id: ignored by lws, but useful to contain user information bound
* to the selected protocol. For example if this protocol was
* called "myprotocol-v2", you might set id to 2, and the user
* code that acts differently according to the version can do so by
* switch (wsi->protocol->id), user code might use some bits as
* capability flags based on selected protocol version, etc.
* @owning_server: the server init call fills in this opaque pointer when
* registering this protocol with the server.
* @protocol_index: which protocol we are starting from zero
...
...
@@ -882,6 +888,7 @@ struct libwebsocket_protocols {
size_t
per_session_data_size
;
size_t
rx_buffer_size
;
int
no_buffer_all_partial_tx
;
unsigned
int
id
;
/*
* below are filled in on server init and can be left uninitialized,
...
...
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
register
or
sign in
to comment