Thank you so much for your reply! It makes alot more sense now.
If more questions should arise, we now know were to ask them.

Thanks again

Hi again,

Our project is about implementing wolfssl on a STM32F0-Nucleo and a MSP430. We want wolfSSL to use UART-communication instead of default socket communication. The basic idea is to let our hardware communicate through UART to a program on a PC that will redirect the communication to a server-program on the same PC.

We want to know in which way wolfssl sends and receives data. I think the following question will give you and idea of what we're wondering about:
Is there any way to let wolfssl know that the UART is receiving data or do wolfssl try to receive the data whenever it has time?
Which arguments in EmbedSend and EmbedReceive can be ignored and how are we suppose to use the remaining ones?
Both EmbedSend and EmbedReceive returns an integer value, how does wolfssl handle these internally? Is there anything important to know about the return value? Can wolfssl in any way use the file descriptor (or context descriptor) to do anything and if so what?
Finally, in which way do wolfssl expect to send data and recieve data (by default)?

Hi,
First of all, we have an Eval board that will use an ESP8266 to communicate with the internet. The ESP8266 can only take commands via serial interface and handles all the communication with the internet, from the TCP/IP-layer.

We want to skip the "socket"-communication in wolfSSL and create our own custom send- and receive callbacks that will include serial communication with the ESP8266.

We have read the wolfSSL manual and porting guide and done the following:
- Created (or more like copying EmbedSend and EmbedRecv) our own send- and receive functions, MyEmbedSend and MyEmbedRecv.
- Registered MyEmbedRecv and MyEmbedSend as CallbackIORecv respectively CallbackIOSend in the CTX object.

We trying to create custom send- and receive callbacks but get confused by how it should be done. In the wolfSSL manual there is an explanation for the functions wolfSSL_SetIOWriteCTX and wolfSSL_SetIOReadCTX:
"... If you’ve registered your own send callback you may want to set a specific context for the session. For example, if you’re using memory buffers the context may be a pointer to a structure describing where and how to access the memory buffers."
How should the structure look like if it were to describe where and how to access the memory buffers (or something similar)? It sounds like the structure needs to be formed in a certain way but no information regarding how that shall be done is given.

Can you help us? Maybe give us an example of how it can work or should be done in order to get our project going.