api: use high level message dispatcher in API
Use the new `BaseAPI._message` high level message dispatcher that is more convenient to use.
This commit is contained in:
parent
aa07c5ec82
commit
ae27e0ccc6
1 changed files with 2 additions and 3 deletions
|
|
@ -159,10 +159,9 @@ class API(BaseAPI):
|
|||
|
||||
server.send(msg, fds=fds, destination=addr)
|
||||
|
||||
def _dispatch(self, server):
|
||||
msg, _, addr = server.recv()
|
||||
def _message(self, msg, fds, sock, addr):
|
||||
if msg["method"] == 'setup-stdio':
|
||||
self._setup_stdio(server, addr)
|
||||
self._setup_stdio(sock, addr)
|
||||
|
||||
def _cleanup(self):
|
||||
if self._output_pipe:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue