From: Christian H. <ch...@gn...> - 2002-11-11 02:40:27
|
On Sun, Nov 10, 2002 at 09:16:58PM -0500, William T. Mahan wrote: > On Sun, Nov 10, 2002 at 03:39:16PM -0500, Ethan Blanton wrote: > > > > I'm not sure precisely what read/write while loops you're speaking of, > > but we *really* need to avoid I/O requiring synchronicity (yes, that's > > What I meant is that the I/O handlers that actually call read() and > write() on sockets will need to be moved out of the generic ft.c and > into the prpls. This means more work for the prpls but a simpler > interface. There's a simple solution for this. You just add two new functions to the prpl interface. One for reading, one for writing. Before doing a read() or write() (you should be using these instead of the loops ANYWAY, or at least a less costly function, like fgetc or fputc) you should check if these functions are NULL. If they're NULL, use read/write. If not, use the functions. > OK, here's my shot at a new interface. What follows is the part > visible to the prpls (i.e. this goes in prpl.h). I haven't had a chance to read it yet. I'll look at it in a sec. > This is somewhat different from the current API, but I want to get it > right this time; comments are welcome. You'll probably get them soon :) My friend, Steph, has pics for me. I want them. This is why MSN is about to have file transfer, but that won't be done until the FT API works with it... so I have some incentive at the moment ;) Christian -- Christian Hammond <> The GNUpdate Project ch...@gn... <> http://www.gnupdate.org/ Why doesn't the Bat Computer ever crash? |