On 08/29/11 01:26, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>>      It uses pthreads and bidirectional pipe(2)s. All FLTK operation
>>      is handled by the parent; the threads are just data pumps.
>>      [I chose not to use add_fd() to facilitate a Windows port]
> 
> On WIN32, add_fd() will work OK for sockets, so I wonder if we could
> spawn/create a (win32 specific) process that handles the "remote" end of
> the connection and talk to that via sockets using add_fd() etc.
> That might be a portable way of isolating the win32 specific weirdness
> from the fltk end of things?

        Mmm, good point.
        That indeed might be more portable. Win32's berkeley sockets
        are very unixy and behave pretty well.

        I know the native win32 pipe/thread approach works well
        and is not buggy; I've used that in closed source apps
        since the WinNT days, and those apps get a lot of 24 hour
        use and very stable.

        But I don't know if I ever tried using bsd sockets on windows
        for unbuffered stdio interaction with a child process; do you
        know that to be a stable route?

        I kinda like using threads though, cause I know any weird
        blocking won't hiccup the UI; the read/writes can block
        all day and not affect FLTK's response. For this purpose,
        I do like threads and feel I can trust them.

        Oh, and BTW, I did try your fl_term app -- neat!
        It worked really well. I see it derived from Fl_Box,
        so it implements all the text handling itself, and
        seemed pretty fast even with big reports, like 'find /'.
        (In mine, I cheated and used Fl_Text_Editor which is
        imperfect for a tty, but it gets you copy/paste and
        screen history for free)

        I didn't have any trouble playing with fl_term in
        man pages, vi, and messing with colors, which is saying
        a lot for a new terminal app. Usually tty emulation
        is buggy, but it seemed pretty good. Too bad about
        copy/paste, screen history, and 80x25. But I see
        you've got the bsd + sysv pty stuff in there; nice!

        Hopefully one of us will get enough time to make
        an actual xterm compatible terminal out of it.
        I never liked xterm (too much ancient athena),
        and kde's term seems to want a bunch of KDE daemons
        running, which drives me nuts.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to