add infrastructure to cleanly swap inbetween the DB and the IO queue; add infrastructure needed for async message reading.
- QueueDBOperation(): use our own vars on the AsyncIO struct, so we don't overwrite handlers & events from the file I/O stuff.
- DB_PerformNext(): don't use default: so we get warnings if new states are added and not handled here.
- DB_PerformNext(): if we don't get a DB query or Terminate, the db operations are done, remove our handlers, this AsyncIO context is handed over into another Queue by the application logic.
- NextDBOperation(): use our own vars on the AsyncIO struct, so we don't overwrite handlers & events from the file I/O stuff.
- HandleInbound(): handle more read-states; needed for message reading.
- HandleInbound(): move Rumpelstilskin lookup if to switch()
- IO_send_callback(): fix/add IO debugging to /tmp/foo
- IO_send_callback(): Adjust switch to some edge cases:
- eSendReply: check whether we're done with sending, if, fall forward to writing.
- eReadMore: was missing, continue reading (if)
- eReadPayload: new, read smtp messages for example.
- eDBQuery: the application logic want to perform database I/O with this context, clean up hooks and remove it from this queue.
- set_start_callback(): properly hanle the new cases
- IO_recv_callback(): fix/add IO debugging to /tmp/foo
- ReAttachIO(): use me if you want to continue with file I/O after i.e. DB-I/O