On Thu, Sep 25, 2003 at 10:50:15PM +0100, Jonathan Howard wrote: > Before I start, sorry I don't know the solution. > > I've tried to rewrite WSL (my changed, working but incomplete version > attached).
Don't. It was enough of a nightmare the first time. Sun do not follow their own spec and have tons of bugs, and most of the code is workarounds. > Doing what I thought was more correct. > In that the socket channel was non-blocking such that; the write > completes (and data buffer should not be touched) until the next select. > Then read off the position to see if it's at the limit. > > I've discovered that I'm getting into a intensive loop where send is 0. > I added code to 6207 for checking this, it happens, just not as much. > > Reading the API. The API is the beginning of understanding, not the end. Talk to zab. > > SocketChannel.write > "A socket channel in non-blocking mode, for example, cannot write any > more bytes than are free in the socket's output buffer." > > i.e. The non-blocking behavior is to fill the output buffer and return > and not what I presumed to write up to my data buffers limit. The non-blocking behaviour doesn't block. What did you expect it to do? It can't write data that isn't there. > > So the buffer is full when send=0 is occurring. Would you please tell me what the basic problem appears to be? > > Both version should only get selected when OP_WRITE has been set. > This should be when "corresponding channel is ready for writing". > But it isn't ready for writing the buffer is full! > > I can only see an option for setting the size of the buffer, none for > checking how full it is. > > Any ideas. > -- Matthew J Toseland - [EMAIL PROTECTED] Freenet Project Official Codemonkey - http://freenetproject.org/ ICTHUS - Nothing is impossible. Our Boss says so.
signature.asc
Description: Digital signature
_______________________________________________ Devl mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl
