# Method SSL.sslport()->bind()

Method bind

  `int bind(int port, function(SSL.sslfile|void, mixed|void:int) callback, string|void ip)`

Description

  Bind an SSL port.

Parameter `port`

  Port number to bind.

Parameter `callback`

  Callback to call when the SSL connection has been negotiated.

  The callback is called with an SSL.sslfile as the first argument, and the id for the SSL.sslfile as the second.

  If the callback is `0` (zero), then negotiated SSL.sslfiles will be enqueued for later retrieval with accept().

Parameter `ip`

  Optional IP-number to bind.

Returns

  Returns `1` if binding of the port succeeded, and `0` (zero) on failure.

See also

  Stdio.Port()->bind(), SSL.sslfile()->set_accept_callback(), listen_fd()