set_onerror
You can set an error handling event. As a parameter provide function with prototype: void [name of the function](vorlib::socket_e *error, vorlib::server *caller). Error is the error that just happened and caller can be used to distinguish the server, if you have more instances. You shouldn't let any exception get outside, it is recommended to place whatever you are doing between try{ } catch(...).
You can terminate() the server from here.
If you do not set this event and there is an exception, the server will terminate imediatelly, so it is recomended to provide one.