From c5b49e898ee038d71d7c8b6f3c51fc53c35faa25 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Sat, 28 Jun 2003 08:13:24 +0000 Subject: [PATCH] 2003-06-28 Michael Koch * java/net/ServerSocket.java (setChannel): New method. * java/net/Socket.java (setChannel): New method. From-SVN: r68631 --- libjava/ChangeLog | 7 +++++++ libjava/java/net/ServerSocket.java | 8 ++++++++ libjava/java/net/Socket.java | 9 +++++++++ 3 files changed, 24 insertions(+) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 434cc20d7d6..784cd5fc6c0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2003-06-28 Michael Koch + + * java/net/ServerSocket.java + (setChannel): New method. + * java/net/Socket.java + (setChannel): New method. + 2003-06-27 Michael Koch * java/beans/beancontext/BeanContextSupport.java: diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java index 8dd420bbd3b..699319e70b2 100644 --- a/libjava/java/net/ServerSocket.java +++ b/libjava/java/net/ServerSocket.java @@ -164,6 +164,14 @@ public class ServerSocket bind (new InetSocketAddress (bindAddr, port), backlog); } + /* + * This method may only be used by java.nio.channels.ServerSocketChannel.open. + */ + void setChannel (ServerSocketChannel ch) + { + this.ch = ch; + } + /** * Binds the server socket to a specified socket address * diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index 38b31ec8cc8..ef88de5c151 100644 --- a/libjava/java/net/Socket.java +++ b/libjava/java/net/Socket.java @@ -305,6 +305,15 @@ public class Socket // that default. JDK 1.2 doc infers not to do a bind. } + /* + * This method may only be used by java.nio.channels.ServerSocketChannel.accept and + * java.nio.channels.SocketChannel.open. + */ + void setChannel (SocketChannel ch) + { + this.ch = ch; + } + /** * Binds the socket to the givent local address/port *