diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pso/TTcpSocket.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/pso/TTcpSocket.cpp b/src/pso/TTcpSocket.cpp index e319b0e..7244ad6 100644 --- a/src/pso/TTcpSocket.cpp +++ b/src/pso/TTcpSocket.cpp @@ -179,7 +179,34 @@ short TTcpSocket::send(u8 *data) { } int TTcpSocket::test_connection() { + for (int i = 0; i < 1800; ++i) { + if (int status = stat()) { + log(get_sock_status_name(status)); + set_flags(1); + return 1; + } else if (send_window() <= 128) { + set_flags(1); + return 1; + } else if (stat_val() < 0) { + set_flags(1); + return 1; + } else if (!get_link_status()) { + set_flags(1); + return 1; + } else if (send_window() > 4095) { + return 0; + } else { + main_task.some_empty_func(); + main_task.run_tl_camera_tasks(); + main_task.render(); + main_task.render_screen_overlay(); + func_80019aa0(); + render_tick(); + } + } + set_flags(1); + return 1; } void TTcpSocket::some_stub() {} |