diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-29 09:57:05 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-29 09:57:05 +0000 |
commit | d50299082035ea2e1c8c1a44b4779fe5152a082b (patch) | |
tree | adcaaa3a449aead6635ab9800c8f3f5ba50315d9 /libjava/gnu/java/nio/SocketChannelImpl.java | |
parent | 8803ae556c5ccfce56ae37c9014802f842329e52 (diff) | |
download | gcc-d50299082035ea2e1c8c1a44b4779fe5152a082b.tar.gz |
2002-11-29 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl:
(fd): New member variable to store file descriptor of socket.
* gnu/java/nio/SelectionKeyImpl.java:
(ops): Removed.
(readyOps): New member variable.
(interestOps): New member variable.
(readyOps): Implemented.
(readyOps): New method to set member variable readyOps.
(interestOps): Replaced ops by interestOps.
* gnu/java/nio/SelectorImpl.java:
(SelectorImpl): Initialize key sets.
(select): Call select with -1 instead of Long.MAX_VALUE).
(java_do_select): Make it a native method.
(getFDsAsArray): New helper method.
(select): Remove canceled keys, give only interested file discriptors
to java_do_select, set ready ops.
(add): No need to initialize keys set here.
(add_selected): No need to initialize selected set here.
(deregisterCanceledKeys): New helper method.
(register): Set interest ops, set attachments, added handling of datagram
channels.
* gnu/java/nio/ServerSocketChannelImpl:
(SocketAccept): Renamed from NioSocketAccept.
(implConfigureBlocking): Implemented.
(accept): Use SocketAccept instead of NioSocketAccept.
* gnu/java/nio/SocketChannelImpl:
Reactivate native methods.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu/java/nio/SocketChannelImpl.java')
-rw-r--r-- | libjava/gnu/java/nio/SocketChannelImpl.java | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/libjava/gnu/java/nio/SocketChannelImpl.java b/libjava/gnu/java/nio/SocketChannelImpl.java index b43108ba473..9f2de278d81 100644 --- a/libjava/gnu/java/nio/SocketChannelImpl.java +++ b/libjava/gnu/java/nio/SocketChannelImpl.java @@ -57,25 +57,14 @@ public class SocketChannelImpl extends SocketChannel boolean connected = false; InetSocketAddress sa; -/* static native int SocketCreate(); - static native int SocketConnect(int fd, InetAddress a, int port); - static native int SocketBind(int fd, InetAddress host, int port); + static native int SocketConnect(int fd, InetAddress addr, int port); + static native int SocketBind(int fd, InetAddress addr, int port); static native int SocketListen(int fd, int backlog); static native int SocketAvailable(int fd); static native int SocketClose(int fd); static native int SocketRead(int fd, byte b[], int off, int len); static native int SocketWrite(int fd, byte b[], int off, int len); -*/ - - static int SocketCreate() { return 0; }; - static int SocketConnect(int fd, InetAddress a, int port) { return 0; }; - static int SocketBind(int fd, InetAddress host, int port) { return 0; }; - static int SocketListen(int fd, int backlog) { return 0; }; - static int SocketAvailable(int fd) { return 0; }; - static int SocketClose(int fd) { return 0; }; - static int SocketRead(int fd, byte b[], int off, int len) { return 0; }; - static int SocketWrite(int fd, byte b[], int off, int len) { return 0; }; public SocketChannelImpl(SelectorProvider provider) { @@ -87,7 +76,7 @@ public class SocketChannelImpl extends SocketChannel System.err.println("failed to create socket:"+fd); } } - + public void finalizer() { if (connected) |