help | logout
useSSL

useSSL

Name

useSSL -- Specifies that this connection should use secure SSL communication.

Synopsis

$err = $node->useSSL(keyfile);

Description

Sets up internal data structures to use SSL when communicating with the RSPD. This function is meant to be called before an actual connection is established with the connect() function. Should this function be called while a connection is active that connection will be closed.

The keyfile parameter is the path to the keyfile used by SSL. This file does not have to exist; if it does not, useSSL() will create it.

Returns

Returns -1 if an error occurred, or 0 otherwise. In case of error, the program will croak() with an appriopriate message.