Sdílet prostřednictvím


SSLEngine.CloseInbound Method

Definition

Signals that no more inbound network data will be sent to this SSLEngine.

[Android.Runtime.Register("closeInbound", "()V", "GetCloseInboundHandler")]
public abstract void CloseInbound ();
[<Android.Runtime.Register("closeInbound", "()V", "GetCloseInboundHandler")>]
abstract member CloseInbound : unit -> unit
Attributes

Exceptions

if this engine did not receive a needed protocol specific close notification message from the peer.

Remarks

Signals that no more inbound network data will be sent to this SSLEngine.

If the application initiated the closing process by calling #closeOutbound(), under some circumstances it is not required that the initiator wait for the peer's corresponding close message. (See section 7.2.1 of the TLS specification (RFC 2246) for more information on waiting for closure alerts.) In such cases, this method need not be called.

But if the application did not initiate the closure process, or if the circumstances above do not apply, this method should be called whenever the end of the SSL/TLS data stream is reached. This ensures closure of the inbound side, and checks that the peer followed the SSL/TLS close procedure properly, thus detecting possible truncation attacks.

This method is idempotent: if the inbound side has already been closed, this method does not do anything.

#wrap(ByteBuffer, ByteBuffer) wrap() should be called to flush any remaining handshake data.

Java documentation for javax.net.ssl.SSLEngine.closeInbound().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to