// include user timers(created by set_timer()) and user async calls(started via post(), dispatch() or defer()), this means you can clean up any resource
// in this socket except this socket itself, because this socket maybe is being maintained by object_pool.
//otherwise (bigger than zero), socket simply call this callback ASCS_DELAY_CLOSE seconds later after link down, no any guarantees.
//if you overwrote this callback, do not forget to call parent class' on_close at the end.
virtualvoidafter_close()=0;//a good case for using this is to reconnect the server (please refer to client_socket_base) and return io_context to service_pump.
virtualvoidafter_close(){}//a good case for using this is to reconnect the server, please refer to client_socket_base.
#ifdef ASCS_SYNC_DISPATCH
//return positive value if handled some messages (include all messages), if some msg left behind, socket will re-dispatch them asynchronously