We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b4953b commit 853c953Copy full SHA for 853c953
isotp/__init__.py
@@ -16,13 +16,14 @@ def assert_is_socket(s):
16
17
class socket:
18
19
- def __init__(self):
+ def __init__(self, timeout=0.1):
20
self.interface = None
21
self.rxid = None
22
self.txid = None
23
self.bound = False
24
self.closed = False
25
self._socket = socket_module.socket(socket_module.AF_CAN, socket_module.SOCK_DGRAM,socket_module.CAN_ISOTP)
26
+ self._socket.settimeout(timeout)
27
28
def send(self, *args, **kwargs):
29
return self._socket.send(*args, **kwargs)
0 commit comments