Codebase list libpoe-component-sslify-perl / f9f6649
yet more POD tweaks Apocalypse 11 years ago
1 changed file(s) with 11 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
5555
5656 my $socket = shift;
5757 $socket = Client_SSLify( $socket, $version, $options, $ctx, $callback );
58 $socket is the non-ssl socket you got from somewhere ( probably POE::Wheel::SocketFactory )
59 $version is the SSL version you want to use, see SSLify_ContextCreate
60 $options is the SSL options you want to use, see SSLify_ContextCreate
61 $ctx is the custom SSL context you want to use, see SSLify_ContextCreate
58 $socket is the non-ssl socket you got from somewhere ( required )
59 $version is the SSL version you want to use
60 $options is the SSL options you want to use
61 $ctx is the custom SSL context you want to use
6262 $callback is the callback hook on success/failure of sslification
6363
64 # This is an example of the callback and you should pass it as Client_SSLify( ... \&callback );
64 # This is an example of the callback and you should pass it as Client_SSLify( $socket, ... , \&callback );
6565 sub callback {
6666 my( $socket, $status, $errval ) = @_;
6767 # $socket is the original sslified socket in case you need to play with it
158158
159159 my $socket = shift;
160160 $socket = Server_SSLify( $socket, $ctx, $callback );
161 $socket is the non-ssl socket you got from somewhere ( probably SocketFactory )
162 $ctx is the custom SSL context you want to use, see SSLify_ContextCreate ( overrides the global set in SSLify_Options )
161 $socket is the non-ssl socket you got from somewhere ( required )
162 $ctx is the custom SSL context you want to use; overrides the global ctx set in SSLify_Options
163163 $callback is the callback hook on success/failure of sslification
164164
165 Please look at L</Client_SSLify> for more details on the callback hook.
166
167 SSLify_Options must be set first if you aren't passing a $ctx. If you want to set some options per-connection, do this:
165 BEWARE: L</SSLify_Options> must be called first if you aren't passing a $ctx. If you want to set some options per-connection, do this:
168166
169167 my $socket = shift; # get the socket from somewhere
170168 my $ctx = SSLify_ContextCreate();
171169 # set various options on $ctx as desired
172170 $socket = Server_SSLify( $socket, $ctx );
173171
174 NOTE: You can use SSLify_GetCTX to modify the global, and avoid doing this on every connection if the
172 NOTE: You can use L</SSLify_GetCTX> to modify the global, and avoid doing this on every connection if the
175173 options are the same...
174
175 Please look at L</Client_SSLify> for more details on the callback hook.
176176 =cut
177177
178178 sub Server_SSLify {