Skip to content

Instantly share code, notes, and snippets.

@nishidy
Last active April 2, 2019 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishidy/b1767e1ca90651a369920d0bf496fb99 to your computer and use it in GitHub Desktop.
Save nishidy/b1767e1ca90651a369920d0bf496fb99 to your computer and use it in GitHub Desktop.
TCP_DEFER_ACCEPT test program for client (python)
import socket
import time
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect(('127.0.0.1', 8080))
time.sleep(1)
s.send(b'GET / HTTP/1.1\r\nHost: localhost')
data = s.recv(1024)
print(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment