| 1878 | CancelWaitLow(); |
| 1879 | } |
| 1880 | void TUdpHost::ProcessDebugRequests() { |
| 1881 | TDebugStringCb cb; |
| 1882 | while (DebugReqQueue.Dequeue(cb)) { |
| 1883 | if (!cb) |
| 1884 | continue; |
| 1885 | const TRequesterPendingDataStats& pds = *TotalPendingDataStats; |
| 1886 | TString res; |
| 1887 | char buf[1000]; |
| 1888 | snprintf(buf, sizeof(buf), "Receiving %d transfers, sending %d system prior, sending %d high prior, %d regular, %d low prior\n", |
| 1889 | pds.InpCount, (int)SendOrderSystem.size(), (int)SendOrderHigh.size(), (int)SendOrder.size(), (int)SendOrderLow.size()); |
| 1890 | res += buf; |
| 1891 | |
| 1892 | res += "Total pending data stats:\n"; |
| 1893 | res += GetPendingDataStatsDebug(*TotalPendingDataStats); |
| 1894 | |
| 1895 | for (TColoredRequesterPendingDataStats::const_iterator i = ColoredPendingDataStats.Begin(); i != ColoredPendingDataStats.End(); ++i) { |
| 1896 | const TRequesterPendingDataStats& p = *(i->second); |
| 1897 | if (p.InpCount || p.OutCount) { |
| 1898 | snprintf(buf, sizeof(buf), "Pending data stats for color \"%d\":\n", (int)i->first); |
| 1899 | res += buf; |
| 1900 | res += GetPendingDataStatsDebug(p); |
| 1901 | } |
| 1902 | } |
| 1903 | |
| 1904 | res += "\nSocket info:\n"; |
| 1905 | res += S.GetSockDebug(); |
| 1906 | |
| 1907 | res += "\nHost info:\n"; |
| 1908 | res += GetHostDebug(); |
| 1909 | |
| 1910 | res += "\nConnections info:\n"; |
| 1911 | res += GetConnectionsDebug(); |
| 1912 | |
| 1913 | cb(res); |
| 1914 | } |
| 1915 | } |
| 1916 | |
| 1917 | ////////////////////////////////////////////////////////////////////////// |
| 1918 | |