Merge "Clarify UDP encapsulation socket API"
This commit is contained in:
@@ -502,7 +502,7 @@ public final class IpSecManager {
|
|||||||
* signalling and UDP encapsulated IPsec traffic. Instances can be obtained by calling {@link
|
* signalling and UDP encapsulated IPsec traffic. Instances can be obtained by calling {@link
|
||||||
* IpSecManager#openUdpEncapsulationSocket}. The provided socket cannot be re-bound by the
|
* IpSecManager#openUdpEncapsulationSocket}. The provided socket cannot be re-bound by the
|
||||||
* caller. The caller should not close the {@code FileDescriptor} returned by {@link
|
* caller. The caller should not close the {@code FileDescriptor} returned by {@link
|
||||||
* #getSocket}, but should use {@link #close} instead.
|
* #getFileDescriptor}, but should use {@link #close} instead.
|
||||||
*
|
*
|
||||||
* <p>Allowing the user to close or unbind a UDP encapsulation socket could impact the traffic
|
* <p>Allowing the user to close or unbind a UDP encapsulation socket could impact the traffic
|
||||||
* of the next user who binds to that port. To prevent this scenario, these sockets are held
|
* of the next user who binds to that port. To prevent this scenario, these sockets are held
|
||||||
@@ -541,8 +541,8 @@ public final class IpSecManager {
|
|||||||
mCloseGuard.open("constructor");
|
mCloseGuard.open("constructor");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the wrapped socket. */
|
/** Get the encapsulation socket's file descriptor. */
|
||||||
public FileDescriptor getSocket() {
|
public FileDescriptor getFileDescriptor() {
|
||||||
if (mPfd == null) {
|
if (mPfd == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -931,7 +931,7 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
return mPort;
|
return mPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileDescriptor getSocket() {
|
public FileDescriptor getFileDescriptor() {
|
||||||
return mSocket;
|
return mSocket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user