MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / connect

Method connect

scratchattach/cloud/_base.py:365–382  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

363 self._send_packet(packet)
364
365 def connect(self):
366 if self.websocket:
367 self.websocket.close()
368 if self.event_stream:
369 self.event_stream = None
370 self.websocket = websocket.WebSocket(sslopt={"cert_reqs": ssl.CERT_NONE})
371 self.websocket.connect(
372 self.cloud_host,
373 cookie=self.cookie,
374 origin=self.origin,
375 enable_multithread=True,
376 timeout=self.ws_timeout,
377 header=self.header,
378 )
379 self._handshake()
380 self.active_connection = True
381 if self.print_connect_message:
382 print("Connected to cloud server ", self.cloud_host)
383
384 def disconnect(self):
385 self.active_connection = False

Callers 3

_send_recursiveMethod · 0.95
set_varMethod · 0.95
set_varsMethod · 0.95

Calls 3

_handshakeMethod · 0.95
closeMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected