MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / send

Method send

_pydevd_bundle/pydevd_net_command.py:107–122  ·  view source on GitHub ↗
(self, sock)

Source from the content-addressed store, hash-verified

105 self._as_bytes = as_bytes
106
107 def send(self, sock):
108 as_bytes = self._as_bytes
109 try:
110 if get_protocol() in (HTTP_PROTOCOL, HTTP_JSON_PROTOCOL):
111 sock.sendall(("Content-Length: %s\r\n\r\n" % len(as_bytes)).encode("ascii"))
112 sock.sendall(as_bytes)
113 if self._after_send:
114 for method in self._after_send:
115 method(sock)
116 except:
117 if IS_JYTHON:
118 # Ignore errors in sock.sendall in Jython (seems to be common for Jython to
119 # give spurious exceptions at interpreter shutdown here).
120 pass
121 else:
122 raise
123
124 def call_after_send(self, callback):
125 if not self._after_send:

Callers 1

_on_runMethod · 0.45

Calls 2

get_protocolFunction · 0.90
methodFunction · 0.50

Tested by

no test coverage detected