use ConnectionParams.bindhost
This commit is contained in:
parent
94c501d4de
commit
331cadfb39
1 changed files with 5 additions and 1 deletions
|
@ -46,7 +46,11 @@ class Server(IServer):
|
|||
async def connect(self, params: ConnectionParams):
|
||||
cur_ssl = sc if params.ssl else None
|
||||
reader, writer = await asyncio.open_connection(
|
||||
params.host, params.port, ssl=cur_ssl)
|
||||
params.host,
|
||||
params.port,
|
||||
ssl=cur_ssl,
|
||||
local_addr=(params.bindhost, 0))
|
||||
|
||||
self._reader = reader
|
||||
self._writer = writer
|
||||
self.params = params
|
||||
|
|
Loading…
Reference in a new issue