From: Jay S. <jay...@gm...> - 2006-12-21 06:07:53
|
> > --- > >> if (rcvd == -1 && TCP_BLOCKS) > >> { > >> printf("hi\n"); > >> tcp_can_recv(sock, 100); > >> rcvd = 0; > >> } > >> else > >> { > >> error("recv: %s\n", TCP_STRERROR); > >> return NULL; > >> } > > Do this in the win32 ui_select() instead as it will stall the unix > ui_select() (and perhaps others in uiports). I'm not quite sure what you mean here. This is how you do the same recv loop with a non blocking socket. Minus the printf("hi\n"); of course :) > Personally, I feel that the main loop should be fixed (as in abstracted > and generalised) before we slap any more lipstick on this pig. rdesktop as it is supports two main loop styles. One being the main(X11) loop style and the other being the looping style the uiports use(ui_select is stubbed out in the uiports). I agree that the x11 main loop style is odd. I would like to change it. Jeroen a while back posted a patch that added a select api. I think we should expand on that. This is a separate topic. I'll create a new thread for it. You're right, now is a good time to address this. Jay |