+ if (err == ERR_OK) {
+ outputf("RFB: attempting send %d", sndlength);
+ } else {
+ outputf("RFB: send error %d", err);
+ break;
+ }
+
+ if (tcp_output(pcb) != ERR_OK) {
+ outputf("RFB: tcp_output has had enough");
+ break;
+ }
+
+ state->update_pos += sndlength;
+
+ if (tcp_sndbuf(pcb) == 0) {
+ break;
+ }