MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / disconnect

Method disconnect

examples/API Test/test_api.py:268–275  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

266 return False
267
268 def disconnect(self):
269 if self.socket:
270 try:
271 self.socket.close()
272 except Exception:
273 pass
274 self.socket = None
275 self.receive_buffer = b""
276
277 def recv_message(self, timeout: float = SOCKET_TIMEOUT) -> Optional[dict]:
278 """Receive a newline-delimited JSON message. Returns None on timeout/error."""

Callers 1

mainFunction · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected