yet more POD tweaks
Apocalypse
13 years ago
55 | 55 | |
56 | 56 | my $socket = shift; |
57 | 57 | $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 | |
62 | 62 | $callback is the callback hook on success/failure of sslification |
63 | 63 | |
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 ); | |
65 | 65 | sub callback { |
66 | 66 | my( $socket, $status, $errval ) = @_; |
67 | 67 | # $socket is the original sslified socket in case you need to play with it |
158 | 158 | |
159 | 159 | my $socket = shift; |
160 | 160 | $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 | |
163 | 163 | $callback is the callback hook on success/failure of sslification |
164 | 164 | |
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: | |
168 | 166 | |
169 | 167 | my $socket = shift; # get the socket from somewhere |
170 | 168 | my $ctx = SSLify_ContextCreate(); |
171 | 169 | # set various options on $ctx as desired |
172 | 170 | $socket = Server_SSLify( $socket, $ctx ); |
173 | 171 | |
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 | |
175 | 173 | options are the same... |
174 | ||
175 | Please look at L</Client_SSLify> for more details on the callback hook. | |
176 | 176 | =cut |
177 | 177 | |
178 | 178 | sub Server_SSLify { |