mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8217500: (sc) Move SocketChannelImpl's remaining native methods to Net
Reviewed-by: bpb
This commit is contained in:
parent
a4ec99239c
commit
779991a9c8
10 changed files with 150 additions and 293 deletions
|
@ -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 --
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue