Skip to content

Commit 60abd6e

Browse files
gh-129288: Improve docs for socket on BTPROTO_L2CAP, BDADDR_BREDR et al
1 parent 508ef7d commit 60abd6e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Doc/library/socket.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ created. Socket addresses are represented as follows:
139139

140140
- :const:`BTPROTO_L2CAP` accepts ``(bdaddr, psm, cid, bdaddr_type)`` where ``bdaddr`` is
141141
the Bluetooth address as a string and ``psm``, ``cid`` and ``bdaddr_type`` are integers.
142-
``cid`` and ``bdaddr_type`` are optional.
142+
``cid`` and ``bdaddr_type`` are optional. ``bdaddr_type`` should be one of :const:`BDADDR_BREDR`,
143+
:const:`BDADDR_LE_PUBLIC`, :const:`BDADDR_LE_RANDOM`.
144+
145+
.. versionchanged:: next
146+
Added ``cid`` and ``bdaddr_type`` fields.
143147

144148
- :const:`BTPROTO_RFCOMM` accepts ``(bdaddr, channel)`` where ``bdaddr``
145149
is the Bluetooth address as a string and ``channel`` is an integer.
@@ -635,6 +639,14 @@ Constants
635639
any address when specifying the binding socket with
636640
:const:`BTPROTO_RFCOMM`.
637641

642+
.. data:: BDADDR_BREDR
643+
BDADDR_LE_PUBLIC
644+
BDADDR_LE_RANDOM
645+
646+
These constants describe the Bluetooth address type when binding or connecting a :const:`BTPROTO_L2CAP` socket.
647+
648+
.. versionadded:: next
649+
638650
.. data:: HCI_FILTER
639651
HCI_TIME_STAMP
640652
HCI_DATA_DIR

0 commit comments

Comments
 (0)