Commit 4bcea01a3e2173d7532a57a8c6520154caa5ff0e

Authored by perry.werneck@gmail.com
1 parent df49874b

Incluindo função de interação para facilitar o a interação ocm a libwebsockets

Showing 2 changed files with 10 additions and 16 deletions   Show diff stats
src/include/lib3270.h
... ... @@ -778,6 +778,14 @@
778 778 LIB3270_EXPORT void lib3270_main_iterate(H3270 *h, int wait);
779 779  
780 780 /**
  781 + * @brief Iterate internal's lib3270 event loop.
  782 + *
  783 + * Use it only if the internal I/O calls wasn't replaced.
  784 + *
  785 + */
  786 + LIB3270_EXPORT void lib3270_iterate(int block);
  787 +
  788 + /**
781 789 * Wait for "N" seconds keeping main loop active.
782 790 *
783 791 * @param seconds Number of seconds to wait.
... ...
src/lib3270/iocalls.c
... ... @@ -773,23 +773,9 @@ LIB3270_EXPORT int lib3270_register_handlers(const struct lib3270_callbacks *cbk
773 773  
774 774 }
775 775  
776   -/*
777   -LIB3270_EXPORT int lib3270_call_thread(int(*callback)(H3270 *h, void *), H3270 *h, void *parm)
778   -{
779   - int rc;
780   - CHECK_SESSION_HANDLE(h);
781   -
782   - h->set_timer(h,1);
783   -
784   - lib3270_main_iterate(h,0);
785   - rc = callthread(callback,h,parm);
786   - lib3270_main_iterate(h,0);
787   -
788   - h->set_timer(h,0);
789   -
790   - return rc;
  776 +LIB3270_EXPORT void lib3270_iterate(int block) {
  777 + event_dispatcher(NULL,block);
791 778 }
792   -*/
793 779  
794 780 LIB3270_EXPORT void lib3270_main_iterate(H3270 *hSession, int block)
795 781 {
... ...