Sometime before summer would be fine. I can offer a hand in any
I have already written my own version of select in java
(http://cvs.sourceforge.net/viewcvs.py/zxpy/zxSocket/) but I've learned
a lot since then as I implemented nio for work. The benefits of having
select can not be understated as far as I'm concerned. Switching from
threads to nio was a tremendous boon.
The one problem I remember having was deciding how to handle the data
in the ByteBuffer after reading from the socket. I wasn't sure whether
I needed to decode the data or not because I didn't know what the
requester wanted. Do you have the code available so I can see how you
accomplished this? I haven't looked at my implementation in a long
time and I didn't complete the full socket functionality. How did you
handle errno or did you use the version in CVS?
On Jan 16, 2005, at 06:39 AM, Alan Kennedy wrote:
> [brian zimmer]
> > It's available here: http://ziclix.com/jython/missing/
> > Anyone interested in looking at some of these? I've already
> > written the sets module.
> I already have
> 1. A mostly working cpython-2.3-compatible socket module, including
> support for timeouts, non-blocking mode, etc, etc.
> 2. A mostly working cpython-2.3-compatible select module, including
> support for both poll objects and select functions.
> 3. The design for a java.nio-native asyncore module.
> All of these are layered on java.nio, and all are written in jython.
> When I say "mostly working", I mean mostly passing the relevant
> cpython test suites.
> They still require a fair amount of work. They require cleaning up,
> and there are still a couple of bugs that need to be chased down.
> Lastly, I am uncertain on how to handle socket errors and exceptions:
> should I try to emulate the cpython exception interface, or just pass
> the java.nio exceptions directly? Or both, and offer a
> cpython-compatibility mode, so that existing cpython non-blocking code
> can be run out-of-the-box?
> I expect that I'll find the time to finish them off sometime before
> the summer.
> Does that fit in with your timetable, Brian?
> Alternatively, if anyone out there feels they have the requisite
> java.nio and cpython 2.3/2.4 socket experience, I will consider
> proposals to provide assistance, and thus advance the timetable.
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> Jython-dev mailing list