Browse Source

aiosocks.open_connection example

main
nibrag 8 years ago
parent
commit
2be9a64042
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      README.rst

+ 7
- 0
README.rst View File

@@ -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__':


Loading…
Cancel
Save