Skip to content

Commit

Permalink
aiosocks.open_connection example
Browse files Browse the repository at this point in the history
  • Loading branch information
nibrag committed May 17, 2016
1 parent 1f0bbe4 commit 2be9a64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down

0 comments on commit 2be9a64

Please sign in to comment.