This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
java.net.SocketOptions
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Mon, 2 Sep 2002 15:08:19 +0200
- Subject: java.net.SocketOptions
Hi list,
I have added al options that were missing for JDK 1.4 completeness of the
interface SocketOptions. I will send several patches for other classes using
this options in the near future.
Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1426
diff -u -b -r1.1426 ChangeLog
--- ChangeLog 2 Sep 2002 09:19:07 -0000 1.1426
+++ ChangeLog 2 Sep 2002 12:54:12 -0000
@@ -1,3 +1,9 @@
+2002-09-03 Michael Koch <konqueror@gmx.de>
+
+ * java/net/SocketOptions.java: added static variables to be JDK 1.4
+ compatible (SO_BROADCAST, SO_OOBINLINE, IP_MULTICAST_IF2,
+ IP_MULTICAST_LOOP, IP_TOS
+
2002-09-02 Michael Koch <konqueror@gmx.de>
* java/net/DatagramPacket.java, java/net/MulticsstSocket.java:
Index: java/net/SocketOptions.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/SocketOptions.java,v
retrieving revision 1.7
diff -u -b -r1.7 SocketOptions.java
--- java/net/SocketOptions.java 30 Aug 2002 18:16:00 -0000 1.7
+++ java/net/SocketOptions.java 2 Sep 2002 12:54:12 -0000
@@ -51,6 +51,7 @@
*
* @author Aaron M. Renn (arenn@urbanophile.com)
* @author Warren Levy <warrenl@cygnus.com>
+ * @status should be completely JDK 1.4 compatible
*/
public interface SocketOptions
{
@@ -63,6 +64,7 @@
/**
* Option id for the SO_KEEPALIVE value
+ * @since 1.3
*/
static final int SO_KEEPALIVE = 0x8;
@@ -99,6 +101,18 @@
static final int SO_REUSEADDR = 0x04; // 4
/**
+ * Sets SO_BROADCAST for a socket
+ * @since 1.4
+ */
+static final int SO_BROADCAST = 0x20; // 32
+
+/**
+ * Sets SO_OOBINLINE for a socket
+ * @since 1.4
+ */
+static final int SO_OOBINLINE = 0x1003; // 4099
+
+/**
* Option id for the TCP_NODELAY value
*/
static final int TCP_NODELAY = 0x01; // 1
@@ -107,6 +121,25 @@
* Options id for the IP_MULTICAST_IF value
*/
static final int IP_MULTICAST_IF = 0x10; // 16
+
+/**
+ * same as above
+ * @since 1.4
+ */
+static final int IP_MULTICAST_IF2 = 0x1F; // 31
+
+/**
+ * This option enables or disables local loopback of multicast datagrams.
+ * @since 1.4
+ */
+static final int IP_MULTICAST_LOOP = 0x12; // 18
+
+/**
+ * This option sets the type-of-service or traffic class field in the
+ * IP header for a TCP or UDP socket.
+ * @since 1.4
+ */
+static final int IP_TOS = 0x03; // 3
/*************************************************************************/