8217500: (sc) Move SocketChannelImpl's remaining native methods to Net

Reviewed-by: bpb
This commit is contained in:
Alan Bateman 2019-01-23 13:16:16 +00:00
parent a4ec99239c
commit 779991a9c8
10 changed files with 150 additions and 293 deletions

View file

@ -524,11 +524,28 @@ public class Net {
static native int poll(FileDescriptor fd, int events, long timeout)
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 --
/**