This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.net


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attached patch to make it possible to create 
java.nio.SocketChannel and java.nio.ServerSocketChannel objects.

This patch adds two new packag-private methods to java.net.Socket and 
java.net.ServerSocket. They will be called from native java.nio code 
to circumvent the package-privateness.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+/U8DWSOgCCdjSDsRAsBtAJ9/6voydqZ/eNZX9/Taa0QH8RLlagCfVSwC
jXreq6IOESnTs9ToRnFUW/s=
=ieIx
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2008
diff -u -b -B -r1.2008 ChangeLog
--- ChangeLog	27 Jun 2003 21:00:16 -0000	1.2008
+++ ChangeLog	28 Jun 2003 08:08:52 -0000
@@ -1,3 +1,10 @@
+2003-06-28  Michael Koch  <konqueror@gmx.de>
+
+	* java/net/ServerSocket.java
+	(setChannel): New method.
+	* java/net/Socket.java
+	(setChannel): New method.
+
 2003-06-27  Michael Koch  <konqueror@gmx.de>
 
 	* java/beans/beancontext/BeanContextSupport.java:
Index: java/net/ServerSocket.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/ServerSocket.java,v
retrieving revision 1.22
diff -u -b -B -r1.22 ServerSocket.java
--- java/net/ServerSocket.java	19 Jun 2003 15:08:22 -0000	1.22
+++ java/net/ServerSocket.java	28 Jun 2003 08:08:52 -0000
@@ -164,6 +164,14 @@
     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
    *
Index: java/net/Socket.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/Socket.java,v
retrieving revision 1.24
diff -u -b -B -r1.24 Socket.java
--- java/net/Socket.java	17 Jun 2003 19:11:56 -0000	1.24
+++ java/net/Socket.java	28 Jun 2003 08:08:57 -0000
@@ -305,6 +305,15 @@
     // 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
    *

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]