-
-
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 1 commit
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,66 @@ | |||||||||
| 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 | ||||||||||
|
|
||||||||||
| Values to specify level for Bluetooth socket options in | ||||||||||
|
Check warning on line 690 in Doc/library/socket.rst
|
||||||||||
| :func:`setsockopt` and :func:`getsockopt`. | ||||||||||
|
|
||||||||||
| .. availability:: | ||||||||||
| :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_* | ||||||||||
|
|
||||||||||
| Option names and values for Bluetooth socket options in | ||||||||||
|
Check warning on line 706 in Doc/library/socket.rst
|
||||||||||
| :func:`setsockopt` and :func:`getsockopt`. | ||||||||||
|
|
||||||||||
| .. availability:: | ||||||||||
| :const:`!BT_*` :const:`L2CAP_LM` are only available on Linux. | ||||||||||
| :const:`!SO_BTH_*` are only available on Windows. | ||||||||||
| Other constants may be available on Linux and BSD. | ||||||||||
|
|
||||||||||
| .. 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. | ||||||||||
|
|
||||||||||
| .. availability:: Linux and BSD | ||||||||||
|
||||||||||
| .. availability:: Linux and BSD | |
| .. availability:: Linux, FreeBSD |
Consistent with your first one, also we cannot officially guarantee *BSD support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not only FreeBSD. In several places I use BSD as a shortcut for FreeBSD, NetBSD and DragonFly BSD.
Note that different constants are available on different platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| on NetBSD and DragonFly BSD. | |
| Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD. | |
| for NetBSD and DragonFly BSD. | |
| Added :const:`!HCI_DATA_DIR` for FreeBSD, NetBSD and DragonFly BSD. |
I think for is more fitting here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I also prefer "on NetBSD" here.
| 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.