MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / use_client_stream

Method use_client_stream

asyncpg/_testbase/fuzzer.py:175–182  ·  view source on GitHub ↗

Wrap the accepted socket in a stream, optionally with direct TLS.

(self, ssl_context=None)

Source from the content-addressed store, hash-verified

173 return True
174
175 async def use_client_stream(self, ssl_context=None):
176 """Wrap the accepted socket in a stream, optionally with direct TLS."""
177 self.client_reader = asyncio.StreamReader()
178 protocol = asyncio.StreamReaderProtocol(self.client_reader)
179 transport, _ = await self.loop.connect_accepted_socket(
180 lambda: protocol, self.client_sock, ssl=ssl_context)
181 self.client_writer = asyncio.StreamWriter(
182 transport, protocol, self.client_reader, self.loop)
183
184 async def start_tls(self, ssl_context):
185 writer = self.client_writer

Callers 1

prepareMethod · 0.80

Calls

no outgoing calls

Tested by 1

prepareMethod · 0.64