Method: Puma::DSL#bind
- Defined in:
- lib/puma/dsl.rb
#bind(url) ⇒ Object
Bind the server to url. “tcp://”, “unix://” and “ssl://” are the only accepted protocols. Multiple urls can be bound to, calling bind does not overwrite previous bindings.
The default is “tcp://0.0.0.0:9292”.
You can use query parameters within the url to specify options:
-
Set the socket backlog depth with
backlog, default is 1024. -
Set up an SSL certificate with
key&cert. -
Set up an SSL certificate for mTLS with
key,cert,caandverify_mode. -
Set whether to optimize for low latency instead of throughput with
low_latency, default is to not optimize for low latency. This is done viaSocket::TCP_NODELAY. -
Set socket permissions with
umask.
286 287 288 289 |
# File 'lib/puma/dsl.rb', line 286 def bind(url) @options[:binds] ||= [] @options[:binds] << url end |