Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mamantoha committed Jul 26, 2024
1 parent 1c92ed7 commit 8b71f2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/http/proxy/server.cr
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ class HTTP::Proxy::Server
handlers.first
end

# Creates a `TCPServer` listening on `host:port` and adds it as a socket, returning the local address
# and port the server listens on.
#
# If *reuse_port* is `true`, it enables the `SO_REUSEPORT` socket option,
# which allows multiple processes to bind to the same port.
def bind_tcp(host : String, port : Int32, reuse_port : Bool = false) : Socket::IPAddress
tcp_server = TCPServer.new(host, port, reuse_port: reuse_port)

Expand Down

0 comments on commit 8b71f2d

Please sign in to comment.