| 4451 | } |
| 4452 | |
| 4453 | int srt::CUDT::bstats(SRTSOCKET u, CBytePerfMon* perf, bool clear, bool instantaneous) |
| 4454 | { |
| 4455 | #if ENABLE_BONDING |
| 4456 | if (u & SRTGROUP_MASK) |
| 4457 | return groupsockbstats(u, perf, clear); |
| 4458 | #endif |
| 4459 | |
| 4460 | try |
| 4461 | { |
| 4462 | CUDT& udt = uglobal().locateSocket(u, CUDTUnited::ERH_THROW)->core(); |
| 4463 | udt.bstats(perf, clear, instantaneous); |
| 4464 | return 0; |
| 4465 | } |
| 4466 | catch (const CUDTException& e) |
| 4467 | { |
| 4468 | return APIError(e); |
| 4469 | } |
| 4470 | catch (const std::exception& ee) |
| 4471 | { |
| 4472 | LOGC(aclog.Fatal, log << "bstats: UNEXPECTED EXCEPTION: " << typeid(ee).name() << ": " << ee.what()); |
| 4473 | return APIError(MJ_UNKNOWN, MN_NONE, 0); |
| 4474 | } |
| 4475 | } |
| 4476 | |
| 4477 | #if ENABLE_BONDING |
| 4478 | int srt::CUDT::groupsockbstats(SRTSOCKET u, CBytePerfMon* perf, bool clear) |
nothing calls this directly
no test coverage detected