From 2be9a64042edb178a4a7b6315288536c0de7e00c Mon Sep 17 00:00:00 2001 From: nibrag Date: Tue, 17 May 2016 14:48:36 +0300 Subject: [PATCH] aiosocks.open_connection example --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 4208a72..bc6a971 100644 --- a/README.rst +++ b/README.rst @@ -57,6 +57,13 @@ direct usage # use socks protocol transport, protocol = await aiosocks.create_connection( None, proxy=socks4_addr, proxy_auth=None, dst=dst) + + # StreamReader, StreamWriter + reader, writer = await aiosocks.open_connection( + proxy=socks5_addr, proxy_auth=socks5_auth, dst=dst, remote_resolve=True) + + data = await reader.read(10) + writer.write('data') if __name__ == '__main__':