void TCPSOCKET_RECV_100K_NONBLOCK() { TCPSocket sock; _tcpsocket_connect_to_chargen_srv(sock); sock.set_blocking(false); sock.sigio(callback(_sigio_handler, Thread::gettid())); Timer timer; timer.start(); rcv_n_chk_against_rfc864_pattern_nonblock(sock); timer.stop(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); printf("MBED: Time taken: %fs\n", timer.read()); }
void TCPSOCKET_RECV_100K_NONBLOCK() { TCPSocket sock; nsapi_error_t err = _tcpsocket_connect_to_chargen_srv(sock); if (err != NSAPI_ERROR_OK) { TEST_FAIL(); return; } sock.set_blocking(false); sock.sigio(callback(_sigio_handler, Thread::gettid())); rcv_n_chk_against_rfc864_pattern_nonblock(sock); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); }