MCPcopy Index your code
hub / github.com/websocket-client/websocket-client / settimeout

Method settimeout

websocket/_core.py:161–172  ·  view source on GitHub ↗

Set the timeout to the websocket. Parameters ---------- timeout: int or float timeout time (in seconds). This value could be either float/integer.

(self, timeout: Optional[Union[float, int]])

Source from the content-addressed store, hash-verified

159 return self.sock_opt.timeout
160
161 def settimeout(self, timeout: Optional[Union[float, int]]):
162 """
163 Set the timeout to the websocket.
164
165 Parameters
166 ----------
167 timeout: int or float
168 timeout time (in seconds). This value could be either float/integer.
169 """
170 self.sock_opt.timeout = timeout
171 if self.sock:
172 self.sock.settimeout(timeout)
173
174 timeout = property(gettimeout, settimeout)
175

Callers 5

_open_socketFunction · 0.80
closeMethod · 0.80
create_connectionFunction · 0.80
initialize_socketMethod · 0.80
test_secure_websocketMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_secure_websocketMethod · 0.64