src/java.base/share/classes/sun/nio/ch/Net.java
changeset 53445 c96f9aa1f3d8
parent 53422 6f02e036630e
child 54154 1caf2daef7cf
child 57110 b848ca1ef778
child 57115 512e7cc6ccce
--- a/src/java.base/share/classes/sun/nio/ch/Net.java	Wed Jan 23 13:37:12 2019 +0100
+++ b/src/java.base/share/classes/sun/nio/ch/Net.java	Wed Jan 23 13:16:16 2019 +0000
@@ -525,10 +525,27 @@
         throws IOException;
 
     /**
+     * Polls a connecting socket to test if the connection has been established.
+     *
+     * @apiNote This method is public to allow it be used by code in jdk.sctp.
+     *
+     * @param timeout the timeout to wait; 0 to not wait, -1 to wait indefinitely
+     * @return 1 if connected, 0 if not connected, or IOS_INTERRUPTED
+     */
+    public static native int pollConnect(FileDescriptor fd, long timeout)
+        throws IOException;
+
+    /**
      * Return the number of bytes in the socket input buffer.
      */
     static native int available(FileDescriptor fd) throws IOException;
 
+    /**
+     * Send one byte of urgent data (MSG_OOB) on the socket.
+     */
+    static native int sendOOB(FileDescriptor fd, byte data) throws IOException;
+
+
     // -- Multicast support --
 
     /**