Commit fc568ff045e6a8956221c3f095ed8e7200fa5f74

zhenhaonong 2023-03-17T19:53:50

Deal with partial writes on SSL write SSL write may do partial writes in some cases. For example, document of mbedtls_ssl_write says: If the return value is non-negative but less than length, the function must be called again with updated arguments: buf + ret, len - ret (if ret is the return value) until it returns a value equal to the last 'len' argument. In case of partial writes, we should continue writing the same chain of buffer, not the next chain.