in reply to Re: Re: non-blocking TCP/IP client object using callbacks
in thread non-blocking TCP/IP client object using callbacks

Perhaps the caller could periodically pass the controll back to the socket listener? Thus you would not need the parallelism whis is allways a bit tricky.
  • Comment on Re: Re: Re: non-blocking TCP/IP client object using callbacks

Replies are listed 'Best First'.
Re: Re: Re: Re: non-blocking TCP/IP client object using callbacks
by jettero (Monsignor) on Jul 22, 2003 at 12:50 UTC
    That won't probably work quite right. Since the caller will probably be Curses, or GTK or something, control needs to be with the UI nearly all the time.

    If you ever got stuck in a blocking getline or something, the UI would be very irritating. Anyway, I had considered that. But if you want to release a module that other people are likely to use... then you have to do the hard work for them. :)

    I just asked about this here, because I wanted to make sure what I was doing was ... a good way to do it.

      How about an UI with callbacks for communication? Like Tk::fileevent in Tk.