Package com.wolfssl
Interface WolfSSLIORecvCallback
-
public interface WolfSSLIORecvCallback
wolfSSL I/O Receive Callback Interface. This interface specifies how applicaitons should implement the I/O receive callback class to be used by wolfSSL.After implementing this interface, it should be passed as a parameter to the
WolfSSLContext.setIORecv()
method to be registered with the native wolfSSL library.- Version:
- 1.0, August 2013
- Author:
- wolfSSL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
receiveCallback(WolfSSLSession ssl, byte[] buf, int sz, java.lang.Object ctx)
I/O receive callback method.
-
-
-
Method Detail
-
receiveCallback
int receiveCallback(WolfSSLSession ssl, byte[] buf, int sz, java.lang.Object ctx)
I/O receive callback method. This method acts as the I/O receive callback to be used with wolfSSL. This can be registered with an SSL session using the WolfSSLContext#setIORecv(WolfSSLIORecvCallback) method.- Parameters:
ssl
- the current SSL session object from which the callback was initiated.buf
- buffer in which the application should place data which has been received from the peer.sz
- size of buffer, bufctx
- I/O context to be used.- Returns:
- the number of bytes read, or an error. For possible error codes, see the default EmbedRecv() function in wolfssl_package/src/io.c
-
-