jdk/src/solaris/classes/sun/nio/ch/SctpNet.java
changeset 4669 11d1dbd3598d
parent 3072 a801b122142f
child 5506 202f599c92aa
--- a/jdk/src/solaris/classes/sun/nio/ch/SctpNet.java	Sun Jan 10 12:29:19 2010 +0000
+++ b/jdk/src/solaris/classes/sun/nio/ch/SctpNet.java	Mon Jan 11 16:04:05 2010 +0000
@@ -29,6 +29,7 @@
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
+import java.nio.channels.AlreadyBoundException;
 import java.util.Set;
 import java.util.HashSet;
 import java.security.AccessController;
@@ -52,8 +53,29 @@
         return false;
     }
 
+    static boolean throwAlreadyBoundException() throws IOException {
+        throw new AlreadyBoundException();
+    }
+
+    static void listen(int fd, int backlog) throws IOException {
+        listen0(fd, backlog);
+    }
+
+    static int connect(int fd, InetAddress remote, int remotePort)
+            throws IOException {
+        return connect0(fd, remote, remotePort);
+    }
+
+    static void close(int fd) throws IOException {
+        close0(fd);
+    }
+
+    static void preClose(int fd) throws IOException {
+        preClose0(fd);
+    }
+
     /**
-     * @param  oneToone
+     * @param  oneToOne
      *         if {@code true} returns a one-to-one sctp socket, otherwise
      *         returns a one-to-many sctp socket
      */
@@ -240,6 +262,15 @@
     /* Native Methods */
     static native int socket0(boolean oneToOne) throws IOException;
 
+    static native void listen0(int fd, int backlog) throws IOException;
+
+    static native int connect0(int fd, InetAddress remote, int remotePort)
+        throws IOException;
+
+    static native void close0(int fd) throws IOException;
+
+    static native void preClose0(int fd) throws IOException;
+
     static native void bindx(int fd, InetAddress[] addrs, int port, int length,
             boolean add, boolean preferIPv6) throws IOException;
 
@@ -271,5 +302,11 @@
             throws IOException;
 
     static native void shutdown0(int fd, int assocId);
+
+    static native void init();
+
+    static {
+        init();
+    }
 }