Joel Dice
87b02eb949
update copyright years
...
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header. If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
JET
b66d8b9fbf
Expanded DatagramChannel and corrected blocking configuration in connect().
2013-07-02 10:10:05 -06:00
Pierre Carrier
74b070f9cc
classpath: java.nio.ByteOrder
...
Used by jruby.
(Not saying I'm gonna implement String.format :)
2012-11-11 06:06:18 +01:00
Joel Dice
2d9bbec214
fix a couple of ByteBuffer regressions
...
The compact() and put(ByteBuffer) methods regressed as of the recent
refactoring to support direct byte buffers.
2012-09-14 11:40:26 -06:00
Mike Jensen
3372210f45
Added .get() implementation
2012-08-16 16:13:51 -06:00
Joel Dice
01be4b23bb
implement JNI methods needed by AWT
...
These include PushLocalFrame, PopLocalFrame, NewDirectByteBuffer,
GetDirectBufferAddress, and GetDirectBufferCapacity.
2012-08-11 06:56:19 -06:00
Joel Dice
9974d91648
implement DatagramChannel.receive and fix Datagrams to be Java 6 compatible
2012-07-10 14:09:14 -06:00
Joel Dice
c602f4673b
implement java.nio.channels.DatagramChannel
2012-07-03 11:24:05 -06:00
Joel Dice
0addd8c814
update copyright years
2012-05-11 17:43:27 -06:00
Joel Dice
b45528203d
avoid crashes due to calling select or wakeup on a closed Selector
2012-01-31 09:48:05 -07:00
Joel Dice
807f2a8d51
avoid crash when Selector.close is called more than once on the same instance
2012-01-30 13:42:32 -07:00
Joel Dice
6153a5c83b
Merge remote-tracking branch 'git/master'
2011-11-04 08:11:14 -06:00
JET
39bee886e3
ByteBuffer and InputStream now better match the standard.
2011-10-20 13:45:47 -06:00
Joel Dice
84bcbbcaa3
implement asReadOnlyBuffer and getShort(int) in ByteBuffer
2011-09-29 18:25:03 -06:00
Joel Dice
0c253c40a2
add ServerSocketChannel.handleReadyOps to fix build
2011-01-13 07:03:28 -07:00
Joel Dice
39018c20e0
check connection readyness in SocketChannel.finishConnect if necessary
2011-01-11 18:39:48 -07:00
Joel Dice
eb3a9f010b
fix false positive return from SocketChannel.finishConnect
...
This fixes a bug in finishConnect such that it would return true even
if the socket had not yet connected successfully.
2011-01-11 18:29:48 -07:00
Joel Dice
4f0dccb53c
add Channels.newChannel methods
2011-01-11 18:26:37 -07:00
Joel Dice
a5742f5985
update copyright years
2010-12-05 20:21:09 -07:00
Joel Dice
b3accf1b30
ServerSocketChannel throws IOException, not Exception
2010-10-13 13:38:31 -06:00
Joel Dice
b3da635b63
add java.nio.channels.Channels implementation
2010-07-13 18:03:25 -06:00
Joel Dice
47d9039b69
switch from gethostbyname to getaddrinfo on POSIX systems
...
gethostbyname may return any combination of IPv4 and IPv6 addresses,
and it's not safe to assume the first address is IPv4, which is all
our code is currently prepared to handle. In contrast, getaddrinfo
allows us to specify whether we want IPv4, IPv6, or both.
We should eventually make this switch on Windows as well, but the
status of getaddrinfo in Windows 2000 is not clear, and MinGW's
ws2tcpip.h only declares it for XP and above.
This commit also adds InetAddress.getByName for explicit DNS lookups.
2010-06-14 16:09:56 -06:00
Joel Dice
b908f575d5
fix several blocking SocketChannel bugs
...
In java-nio.cpp, we can't use GetPrimitiveArrayCritical when reading
from or writing to blocking sockets since it may block the rest of the
VM indefinitely.
In SelectableChannel.java, we can't use a null test on
SelectableChannel.key to determine whether the channel is open since
it might never be registered with a Selector. According to the Sun
documentation, a SelectableChannel is open as soon as it's created, so
that's what we now implement.
2010-06-04 15:37:22 -06:00
Joel Dice
6118792ffd
update copyright years
2009-12-02 19:08:29 -07:00
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
ef00ff80ef
avoid EAGAIN or EWOULDBLOCK errors due to SocketSelector.wakup being called many times between calls to select
2009-10-30 08:55:55 -06:00
Joel Dice
efdfb796d9
implement SocketChannel.isConnected
2009-10-29 16:19:33 -06:00
Joel Dice
59ba4aecf2
implement non-blocking socket connections
2009-10-08 16:26:20 -06:00
Joel Dice
fb40b046fd
fix regression in SocketSelector when selecting ServerSocketChannels
2009-09-28 16:54:49 -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
d1018bf078
update copyright years
2009-03-15 12:02:36 -06:00
Joel Dice
8659c709b7
avoid passing null arguments to native methods in SocketChannel
2009-03-02 15:22:17 -07:00
Joel Dice
fccf906349
add minimal java.net.Socket implementation to support Socket.setTcpNoDelay
2008-11-22 15:32:53 -07:00
Joel Dice
86dfaf9ff0
implement ByteBuffer.getInt(int)
2008-08-12 11:09:17 -06:00
Joel Dice
91494d9081
add constructor to ByteBuffer
2008-03-28 18:08:08 -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
3a208edbbc
update NIO code to be more compatible with Java
2008-03-25 11:18:17 -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
a6a1f8ba98
make ByteBuffer implement Comparable
2007-11-15 11:53:01 -07:00
Joel Dice
d1048f9bcb
implement ByteBuffer.get(byte[])
2007-11-09 14:32:33 -07:00
Eric Scharff
1d04186a0c
Fixed bug in ByteBuffer.getLong()
2007-10-31 09:27:26 -06:00
Eric Scharff
958d39aa03
Add debug information for ByteBuffer
2007-10-30 14:55:00 -06:00
Joel Dice
4b92017ea9
fix several win32 bugs in SocketSelector
2007-10-26 18:04:55 -06:00
Eric Scharff
79ad3bdb76
Exception thrown by ByteBuffer
2007-10-11 17:04:45 -06:00
Eric Scharff
32946417b7
Fixed subtle bug in getLong()
2007-10-11 16:42:33 -06:00
Eric Scharff
00cfa587bc
Various bug fixes and optimizations
2007-10-11 15:41:23 -06:00
Eric Scharff
e831a41e90
Implemented ByteBuffer.clear()
2007-10-11 09:59:52 -06:00
Eric Scharff
9368dd2acc
Fix another off-by-one error when EOS is hit on the socket
2007-10-07 11:35:48 -06:00
Eric Scharff
35a96a0d36
Fix an off-by-one error when EOS is hit on the socket
2007-10-07 09:53:07 -06:00