Skip to content

Instantly share code, notes, and snippets.

View fagci's full-sized avatar
👁️
What's happening?

Mikhail fagci

👁️
What's happening?
View GitHub Profile
@fagci
fagci / net_http_socket_options.rb
Last active September 21, 2022 06:20 — forked from steveyen/gist:1201110
Using TCP_NODELAY with ruby Net HTTP (set socket options)
class MyHTTP < Net::HTTP
def on_connect()
@socket.io.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
end
end
n = 5
host = 'example.com'
port = 80