Commit Graph

23 Commits

Author SHA1 Message Date
Joel Dice
3862128a3a tolerate EINTR in ServerSocketChannel.accept implementation
On POSIX systems, Avian sends a special signal to a thread to
implement Thread.getStackTrace() when called from a different thread.
If the target thread is blocked on a call to accept when this happens,
it will return -1, with errno set to EINTR.  Instead of treating this
as an error, we now just loop and call accept again.
2009-11-16 17:23:09 -07:00
Joel Dice
b15ff58542 provide a useful error message when throwing IOExceptions from Java_java_nio_channels_SocketChannel_natFinishConnect 2009-10-27 09:17:08 -06:00
Joel Dice
1b893c7a19 check for EINPROGRESS in Java_java_nio_channels_SocketChannel_natFinishConnect 2009-10-12 09:28:04 -06:00
Joel Dice
59ba4aecf2 implement non-blocking socket connections 2009-10-08 16:26:20 -06:00
Mike Keesey
77fb0083a4 updated nio native code to properly check for PIPE closure on POSIX OSes 2009-10-05 09:23:53 -06:00
Joel Dice
1a0eef7e2d add support for building with MSVC on Windows 2009-08-26 18:26:44 -06:00
jet
1ffe46a545 added ARM interpreted mode supported 2009-08-06 11:52:36 -06:00
Joel Dice
80d4385cb8 implement blocking mode for SocketChannel and ServerSocketChannel 2009-08-03 08:58:56 -06:00
Joel Dice
29858a5299 implement Selector.selectNow() and select() 2009-07-23 13:08:41 -06:00
Joel Dice
fccf906349 add minimal java.net.Socket implementation to support Socket.setTcpNoDelay 2008-11-22 15:32:53 -07:00
Joel Dice
f423d39b25 explicitly include stdint.h in java-nio.cpp 2008-10-10 11:49:07 -06:00
Frank Jacobs
68513521ef support building on Windows using MinGW
Here is a patch for getting Avian to build in Windows. I used MinGW
and MSYS for the build environment. The patch has the following
changes:

1. java-nio.cpp: Had to add an include and remove a function
declaration that was reported as duplicate.
2. readme.txt: Updated the instructions to include notes about
building on Windows.
3. makefile: Added a conditional for MinGW. I left the existing "ifeq
($(platform),windows)" conditional alone so as to not break
cross-compiled Windows builds. There are some similarities between the
two, so it might be possible to combine portions of them in an elegant
manner. Since I'm not sure how the cross-compiled builds have been
done, I didn't want to mess with that portion of the makefile.
2008-10-10 08:06:31 -06:00
Joel Dice
b59422fa94 fix windows build, where hstrerror is not available 2008-07-21 15:29:02 -06:00
Joel Dice
5b94b17ea2 clean up exception handling in java-nio.cpp 2008-07-21 15:35:14 -06:00
Joel Dice
6cddd10e0a various code cleanups, bug fixes, and compatibility fixes in NIO code 2008-03-25 16:17:29 -06:00
Joel Dice
2edaa82801 prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
Joel Dice
4b92017ea9 fix several win32 bugs in SocketSelector 2007-10-26 18:04:55 -06:00
Joel Dice
eaf1d205cd more windows port fixes 2007-10-24 11:24:19 -06:00
Joel Dice
e145d09523 fix posix build breakage 2007-10-23 17:22:42 -06:00
Joel Dice
1381267e70 mork work on the windows port 2007-10-23 11:22:48 -06:00
Eric Scharff
782081d1ff Use custom initialization scheme to allow the java-nio library to be linked without
the stdc++ library, using a custom operator new
2007-10-08 13:05:56 -06:00
Eric Scharff
19b6e11cbc Make sure to report EOF when reading from a socket channel 2007-10-05 15:51:06 -06:00
Eric Scharff
98269286e5 Implemented a basic NIO socket channel interface. Non-blocking socket channels
and server socket channels are implemented.  This version works but only when
libnative is linked with g++ (because of C++ object creation code that fails
without this linking)
2007-10-05 15:32:56 -06:00