You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say I have an instance of http_server_t, and most of the server settings are end-user configurable. Is it possible to change said server's settings (Of course I assume I'd need to close the server and open it again), or is it better to just make a new instance with the new settings to replace the old one?
Additionally, in a situation such as described above... what should I do with the io_context? I'm currently using restinio::own_io_context(), do I also need to stop and restart the io_context (I'm thinking yes), would you recommend I keep using restinio::own_io_context() or should I switch to an external io_context?
The text was updated successfully, but these errors were encountered:
Is it possible to change said server's settings (Of course I assume I'd need to close the server and open it again), or is it better to just make a new instance with the new settings to replace the old one?
In the current design, the settings are split to several parts and those parts are stored in different objects behind http_server_t instance. And this is performed only at the initialization time (in the constructors of http_server_t and related objects). So you can't change server settings after the creation of http_server_t instance in RESTinio 0.6. You have to recreate the server to apply new settings.
I'm currently using restinio::own_io_context(), do I also need to stop and restart the io_context (I'm thinking yes),
If you recreate http_server_t instance with own_io_contect then io_context will be recreated automatically too. If it is an issue for your usecase (for example, you attach some of your objects to RESTinio's io_context and don't want to lost them) then you have to use external io_context to keep.
Say I have an instance of
http_server_t
, and most of the server settings are end-user configurable. Is it possible to change said server's settings (Of course I assume I'd need to close the server and open it again), or is it better to just make a new instance with the new settings to replace the old one?Additionally, in a situation such as described above... what should I do with the
io_context
? I'm currently usingrestinio::own_io_context()
, do I also need to stop and restart the io_context (I'm thinking yes), would you recommend I keep usingrestinio::own_io_context()
or should I switch to an externalio_context
?The text was updated successfully, but these errors were encountered: