Add method to get socket cookie from socket FileDescriptor
aosp/3502915 use this method from ConnectivityService to get socket cookie that is required for closing QUIC connection. Bug: 311792075 Test: m, boot Change-Id: I17d8a4dd24cfb84e9b008b8eb87eedec67b29020
This commit is contained in:
parent
1cfc7f69ef
commit
b9b8828bf5
1 changed files with 26 additions and 1 deletions
|
|
@ -443,4 +443,13 @@ public class NetworkUtils {
|
|||
|
||||
/** Returns whether the Linux Kernel is x86 */
|
||||
public static native boolean isKernelX86();
|
||||
|
||||
/**
|
||||
* Returns socket cookie.
|
||||
*
|
||||
* @param fd The socket file descriptor
|
||||
* @return The socket cookie.
|
||||
* @throws ErrnoException if retrieving the socket cookie fails.
|
||||
*/
|
||||
public static native long getSocketCookie(FileDescriptor fd) throws ErrnoException;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue