mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
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>
This commit is contained in:
parent
40196c2393
commit
0ba4e76b23
3 changed files with 17 additions and 15 deletions
|
@ -91,7 +91,7 @@ class QEMUMonitorProtocol(qemu.qmp.QEMUMonitorProtocol):
|
|||
self._aqmp.negotiate = True
|
||||
|
||||
self._sync(
|
||||
self._aqmp.accept(self._address),
|
||||
self._aqmp.start_server_and_accept(self._address),
|
||||
timeout
|
||||
)
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue