Skip to content

Instantly share code, notes, and snippets.

@outsinre
Last active November 28, 2025 08:28
Show Gist options
  • Select an option

  • Save outsinre/8b3987e3b4d6a12aac4962555ef70efd to your computer and use it in GitHub Desktop.

Select an option

Save outsinre/8b3987e3b4d6a12aac4962555ef70efd to your computer and use it in GitHub Desktop.
The send buffer has data
local socket = require("socket")
local host, port = "180.101.50.242", 80
local sock = socket.connect(host, port)
sock:settimeout(1)
sock:send("GET / HTTP/1.1\r\n\r\n")
socket.sleep(1)
sock:close()
@outsinre
Copy link
Author

See #tcp-close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment