Skip to content

Commit 2be9a64

Browse files
committed
aiosocks.open_connection example
1 parent 1f0bbe4 commit 2be9a64

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ direct usage
5757
# use socks protocol
5858
transport, protocol = await aiosocks.create_connection(
5959
None, proxy=socks4_addr, proxy_auth=None, dst=dst)
60+
61+
# StreamReader, StreamWriter
62+
reader, writer = await aiosocks.open_connection(
63+
proxy=socks5_addr, proxy_auth=socks5_auth, dst=dst, remote_resolve=True)
64+
65+
data = await reader.read(10)
66+
writer.write('data')
6067
6168
6269
if __name__ == '__main__':

0 commit comments

Comments
 (0)