Method SSL.Port()->bind()
- Method bind
int bind(int port, function(SSL.File|void, mixed|void:int) callback, string|void ip, int|void share)
- 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 File as the first argument, and the id for the File as the second.
If the callback is
0
(zero), then negotiated Files will be enqueued for later retrieval with accept().- Parameter ip
Optional IP-number to bind.
- Parameter share
If true, share the port with other processes
- Returns
Returns
1
if binding of the port succeeded, and0
(zero) on failure.- See also
Stdio.Port()->bind(), File()->set_accept_callback(), listen_fd()