<html><head></head><body>Couldn't you store the code of the compiled module containing the function as binary in an list or binary literal, read it in and call it? <br>
<br>
Oliver <br><br><div class="gmail_quote">On July 9, 2018 9:50:14 PM CEST, Roger Lipscombe <roger@differentpla.net> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 9 July 2018 at 20:16, Code Wiget <codewiget95@gmail.com> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> So, for the ssl options such as:<br> {reuse_session, fun()} {next_protocols_advertised, [binary()]}<br><br> {user_lookup_fun, {fun(), term()}}, {psk_identity, string()}, {srp_identity,<br> {string(), string()}}<br><br> You have to manually set the configuration parameters, and cannot set them<br> in a configuration file?<br></blockquote><br>Yes, but you _can_ come up with some other way to specify them in the<br>configuration file, and then convert that to an actual function before<br>you pass it to SSL options.<br><br>We have something like this in our code:<br><br>convert_ssl_opt({verify_opts, VerifyOpts}, Acc) -><br>    Opt = {verify_fun, {fun do_verify/3, VerifyOpts}},<br>    [Opt | Acc];<br><br>...which converts our invented 'verify_opts' into the required<br>'verify_fun', by using a do_verify function in the module that does<br>the conversion.<br><hr><br>erlang-questions mailing list<br>erlang-questions@erlang.org<br><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>