(self, bt_address)
| 3019 | desc = "read/write packets on a connected L2CAP socket" |
| 3020 | |
| 3021 | def __init__(self, bt_address): |
| 3022 | if WINDOWS: |
| 3023 | warning("Not available on Windows") |
| 3024 | return |
| 3025 | s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_RAW, |
| 3026 | socket.BTPROTO_L2CAP) |
| 3027 | s.connect((bt_address, 0)) |
| 3028 | self.ins = self.outs = s |
| 3029 | |
| 3030 | def recv(self, x=MTU): |
| 3031 | return L2CAP_CmdHdr(self.ins.recv(x)) |