[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/10] python/aqmp: add start_server() and accept() methods
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 08/10] python/aqmp: add start_server() and accept() methods |
Date: |
Fri, 4 Mar 2022 17:59:26 +0000 |
User-agent: |
Mutt/2.1.5 (2021-12-30) |
On Fri, Feb 25, 2022 at 03:59:46PM -0500, John Snow wrote:
> Add start_server() and accept() methods that can be used instead of
> start_server_and_accept() to allow more fine-grained control over the
> incoming connection process.
>
> (Eagle-eyed reviewers will surely notice that it's a bit weird that
> "CONNECTING" is a state that's shared between both the start_server()
> and connect() states. That's absolutely true, and it's very true that
> checking on the presence of _accepted as an indicator of state is a
> hack. That's also very certainly true. But ... this keeps client code an
> awful lot simpler, as it doesn't have to care exactly *how* the
> connection is being made, just that it *is*. Is it worth disrupting that
> simplicity in order to provide a better state guard on `accept()`? Hm.)
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> python/qemu/aqmp/protocol.py | 67 +++++++++++++++++++++++++++++++++---
> python/tests/protocol.py | 7 ++++
> 2 files changed, 69 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 08/10] python/aqmp: add start_server() and accept() methods,
Daniel P . Berrangé <=