| 212 | } |
| 213 | |
| 214 | err_t TcpClient::onSent(uint16_t len) |
| 215 | { |
| 216 | totalSentConfirmedBytes += len; |
| 217 | |
| 218 | if(stream == nullptr && closeAfterSent != eTCCASS_None) { |
| 219 | TcpConnection::onSent(len); |
| 220 | close(); |
| 221 | } else { |
| 222 | // Fire ReadyToSend callback |
| 223 | TcpConnection::onSent(len); |
| 224 | } |
| 225 | |
| 226 | return ERR_OK; |
| 227 | } |
| 228 | |
| 229 | void TcpClient::onError(err_t err) |
| 230 | { |