This may be the solution to both problems. Let me see if I understand you correctly. The variant create would take just the Context, and then before the SSLPort becomes useful, you call listen_fd() and then set the callback?
Yes, or maybe set the callback before listen_fd(). In any case the callback field seems to be externally accessible, so there is nothing preventing you from setting it after create() returns.