Arm Mbed OS support forum

OnHttpReceive and altcp_mbedtls_bio_recv

I am working with the: LPC407x-NoOS-LWIP-MBEDTLS-HTTPD-KEIL/http_core.c at f3943f7487a296a16ddff51885c9c8d0ca07562a · straight-coding/LPC407x-NoOS-LWIP-MBEDTLS-HTTPD-KEIL · GitHub

this example.

I have a question about the OnHttpReceive function for http server,
When TLS active;
We initiated http with HttpdInit and this function calls ; altcp_tls_new and altcp_accept(listen, OnHttpAccept) function.
OnHttpReceive calls => altcp_recv(pcbAccepted, OnHttpReceive) functions when received. (expected)

But altcp_tls_new calls altcp_tls_wrap and it calls, altcp_mbedtls_setup function.
This function include,
below line;
mbedtls_ssl_set_bio(&state->ssl_context, conn, altcp_mbedtls_bio_send, altcp_mbedtls_bio_recv, NULL); So if we received anything always work altcp_mbedtls_bio_recv so how the altcp_recv(pcbAccepted, OnHttpReceive) calling when receiving ?

When I receive some data always works altcp_mbedtls_bio_recv not OnHttpReceive , how can I connect this functions ?