MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / send_request

Method send_request

benches/memory_usage.py:247–259  ·  view source on GitHub ↗

Send a JSON-RPC request. Returns the request id.

(self, method: str, params: dict[str, Any])

Source from the content-addressed store, hash-verified

245 return self._id
246
247 def send_request(self, method: str, params: dict[str, Any]) -> int:
248 """Send a JSON-RPC request. Returns the request id."""
249 rid = self._next_id()
250 q: queue.Queue[dict[str, Any]] = queue.Queue()
251 with self._pending_lock:
252 self._pending[rid] = q
253 self._send_raw({
254 "jsonrpc": "2.0",
255 "id": rid,
256 "method": method,
257 "params": params,
258 })
259 return rid
260
261 def send_notification(self, method: str, params: dict[str, Any]) -> None:
262 """Send a JSON-RPC notification (no id, no response expected)."""

Callers 3

initializeMethod · 0.95
hoverMethod · 0.95
shutdownMethod · 0.95

Calls 2

_next_idMethod · 0.95
_send_rawMethod · 0.95

Tested by

no test coverage detected