-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-132734: Add new constants for Bluetooth sockets #132735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
c9a8981
c7867f9
7d32cb5
da0bffc
381b3f3
d7f9293
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -677,15 +677,62 @@ Constants | |||||||||
| These constants describe the Bluetooth address type when binding or | ||||||||||
| connecting a :const:`BTPROTO_L2CAP` socket. | ||||||||||
|
|
||||||||||
| .. availability:: Linux, FreeBSD | ||||||||||
|
|
||||||||||
| .. versionadded:: 3.14 | ||||||||||
|
|
||||||||||
| .. data:: SOL_RFCOMM | ||||||||||
| SOL_L2CAP | ||||||||||
| SOL_HCI | ||||||||||
| SOL_SCO | ||||||||||
| SOL_BLUETOOTH | ||||||||||
|
|
||||||||||
| Used in the level argument to the :meth:`~socket.setsockopt` and | ||||||||||
| :meth:`~socket.getsockopt` methods of Bluetooth socket objects. | ||||||||||
|
|
||||||||||
| :const:`SOL_BLUETOOTH` is only available on Linux, other constants | ||||||||||
| are available if the corresponding protocol is supported. | ||||||||||
|
|
||||||||||
| .. data:: SO_L2CAP_* | ||||||||||
| L2CAP_LM | ||||||||||
| L2CAP_LM_* | ||||||||||
| SO_RFCOMM_* | ||||||||||
| RFCOMM_LM_* | ||||||||||
| SO_SCO_* | ||||||||||
| SO_BTH_* | ||||||||||
| BT_* | ||||||||||
|
|
||||||||||
| Used in the option name and value argument to the :meth:`~socket.setsockopt` | ||||||||||
| and :meth:`~socket.getsockopt` methods of Bluetooth socket objects. | ||||||||||
|
|
||||||||||
| :const:`!BT_*` and :const:`L2CAP_LM` are only available on Linux. | ||||||||||
| :const:`!SO_BTH_*` are only available on Windows. | ||||||||||
| Other constants may be available on Linux and varios BSD platforms. | ||||||||||
serhiy-storchaka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| .. versionadded:: next | ||||||||||
|
|
||||||||||
| .. data:: HCI_FILTER | ||||||||||
| HCI_TIME_STAMP | ||||||||||
| HCI_DATA_DIR | ||||||||||
| SO_HCI_EVT_FILTER | ||||||||||
| SO_HCI_PKT_FILTER | ||||||||||
|
|
||||||||||
| For use with :const:`BTPROTO_HCI`. :const:`!HCI_FILTER` is only | ||||||||||
| available on Linux and FreeBSD. :const:`!HCI_TIME_STAMP` and | ||||||||||
| :const:`!HCI_DATA_DIR` are only available on Linux. | ||||||||||
| Options names for use with :const:`BTPROTO_HCI`. | ||||||||||
| Availability and format of the option value depend on platform. | ||||||||||
serhiy-storchaka marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| .. versionchanged:: next | ||||||||||
| Added :const:`!SO_HCI_EVT_FILTER` and :const:`!SO_HCI_PKT_FILTER` | ||||||||||
| on NetBSD and DragonFly BSD. | ||||||||||
| Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD. | ||||||||||
|
Comment on lines
+725
to
+726
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think for is more fitting here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it so? I thought that it is more common to write "on platform" than "for platform". There are many examples of the former, and not many of the latter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also prefer "on NetBSD" here. |
||||||||||
|
|
||||||||||
| .. data:: HCI_DEV_NONE | ||||||||||
|
|
||||||||||
| The ``device_id`` value used to create an HCI socket that isn't specific | ||||||||||
| to a single Bluetooth adapter. | ||||||||||
|
|
||||||||||
| .. availability:: Linux | ||||||||||
|
|
||||||||||
| .. versionadded:: next | ||||||||||
|
|
||||||||||
| .. data:: HCI_CHANNEL_RAW | ||||||||||
| HCI_CHANNEL_USER | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add new constants for Bluetooth :mod:`sockets <socket>`. |
Uh oh!
There was an error while loading. Please reload this page.