diff options
| author | John Snow <jsnow@redhat.com> | 2022-02-25 15:59:40 -0500 |
|---|---|---|
| committer | John Snow <jsnow@redhat.com> | 2022-03-07 14:36:41 -0500 |
| commit | 0ba4e76b23fed77d09be7f56da783ab3f0b2d497 (patch) | |
| tree | 734f2cdc04e6616815f62b56d91c37b7d6f06640 /python/qemu/aqmp/protocol.py | |
| parent | 40196c23939758abc5300e85333e676196e3ba6d (diff) | |
| download | focaccia-qemu-0ba4e76b23fed77d09be7f56da783ab3f0b2d497.tar.gz focaccia-qemu-0ba4e76b23fed77d09be7f56da783ab3f0b2d497.zip | |
python/aqmp: rename 'accept()' to 'start_server_and_accept()'
Previously, I had a method named "accept()" that under-the-hood calls bind(2), listen(2) *and* accept(2). I meant this as a simplification and counterpart to the one-shot "connect()" method. This is confusing to readers who expect accept() to mean *just* accept(2). Since I need to split apart the "accept()" method into multiple methods anyway (one of which strongly resembling accept(2)), it feels pertinent to rename this method *now*. Rename this all-in-one method "start_server_and_accept()" instead. Signed-off-by: John Snow <jsnow@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20220225205948.3693480-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu/aqmp/protocol.py')
| -rw-r--r-- | python/qemu/aqmp/protocol.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/qemu/aqmp/protocol.py b/python/qemu/aqmp/protocol.py index 009883f64d..73719257e0 100644 --- a/python/qemu/aqmp/protocol.py +++ b/python/qemu/aqmp/protocol.py @@ -265,8 +265,10 @@ class AsyncProtocol(Generic[T]): @upper_half @require(Runstate.IDLE) - async def accept(self, address: SocketAddrT, - ssl: Optional[SSLContext] = None) -> None: + async def start_server_and_accept( + self, address: SocketAddrT, + ssl: Optional[SSLContext] = None + ) -> None: """ Accept a connection and begin processing message queues. |