Skip to content

use connect() for existing sockets instead of open_with_socket()

John Snow requested to merge jsnow/python-qemu-qmp:socket_connect into main

As an idea: recycle the connect() call for passing in an existing socket instead of adding open_with_socket() and co-opting the accept() call.

There's less changes needed overall for this workflow, doesn't add a new top level command to preserve compatibility for, and re-uses all of the existing error checking primitives in _do_connect(), which saves me the hassle of adding a new _session_guard() command to open_with_socket().

Compatibility notes:

  • This would be a breaking change, but we haven't actually published a version with open_with_socket() yet.

  • This patchset cannot be ported as-is directly to QEMU without some accompanying changes to machine.py. At the moment, I am syncing changes back to QEMU manually, so I can include that extra patch when I go to do the backport.

Merge request reports

Loading