Murat,
thanks for your answer.
You are right it will be a high cost implementing a data transfer where the parameters are changing every time a message in pBuf is received.
Actually, I have implemented this transfer using memcpy. I just wanted to improve the performance of transfers. I will keep using this approach if I does not find a better way to do this.
Thank you very much.
Julian