i see, i was creating NIOSSLContext
in the same function, as i was conceptualizing SSL context creation and bootstrap creation as “expensive, do-once” tasks to be grouped together. but if ClientBootstrap
s are cheap to make, i might as well separate the SSL context creation from the bootstrap creation.
the documentation really emphasizes the importance of creating ClientBootstrap
once and reusing it, i think this advice is unhelpful and caused me to spend a lot of time optimizing something that didn’t need to be optimized.
in this context, a “client” is just a type that wraps some value parameters (API key, account ID, etc.) and a ClientBootstrap
. a “client” can be reused multiple times to connect to the same server.