| 292 | } |
| 293 | |
| 294 | bool EntertainmentMode::update() |
| 295 | { |
| 296 | int ret; |
| 297 | unsigned int total = 0; |
| 298 | |
| 299 | while (total < entertainment_msg.size()) |
| 300 | { |
| 301 | ret = mbedtls_ssl_write( |
| 302 | &tls_context->ssl, (const unsigned char*)&entertainment_msg[total], entertainment_msg.size()); |
| 303 | |
| 304 | if (ret < 0) |
| 305 | { |
| 306 | // Return if mbedtls_ssl_write errors |
| 307 | return false; |
| 308 | } |
| 309 | else |
| 310 | { |
| 311 | total += ret; |
| 312 | } |
| 313 | } |
| 314 | return true; |
| 315 | } |
| 316 | } // namespace hueplusplus |
no test coverage detected