> In general you should never wait for data from sockets or 
> pipes directly
> because your program is likely to block until data becomes available.
> 
> [Under Unix] you can use the Fl::add_fd function so that your pipe or
> socket can be handled via the main event loop so GUI 
> processing can still
> continue while waiting for data. See the docs, and Greg's Cheat Sheet:
> http://www.fltk.org/documentation.php/doc-1.1/Fl.html#Fl.add_fd
> http://seriss.com/people/erco/fltk/#add_fd


For sockets, ::add_fd() works on pretty much all platforms, including
win32.
For pipes, it will really only work reliably on non-win32 hosts, as
win32 pipes are a bit odd.

However, for this example, Fl::add_fd() ought to work on all hosts.




SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to