Advertisement
s243a

add Load Managment Stats to Packets

Oct 5th, 2018
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.26 KB | None | 0 0
  1. #From https://github.com/freenet/fred/blob/cbfae4ae632608f82e5eeaf9a115588b32014c3a/src/freenet/node/NewPacketFormat.java#L637
  2. if(!(addStatsBulk || addStatsRT)) break;
  3.  
  4. if(addStatsBulk) {
  5.   MessageItem item = pn.makeLoadStats(false, false, true);
  6.   if(item != null) {
  7.     byte[] buf = item.getData();
  8.     haveAddedStatsBulk = buf;
  9.     // FIXME if this fails, drop some messages.
  10.     packet.addLossyMessage(buf, maxPacketSize);
  11.   }
  12. }
  13.  
  14. if(addStatsRT) {
  15.   MessageItem item = pn.makeLoadStats(true, false, true);
  16.   if(item != null) {
  17.     byte[] buf = item.getData();
  18.     haveAddedStatsRT = buf;
  19.     // FIXME if this fails, drop some messages.
  20.     packet.addLossyMessage(buf, maxPacketSize);
  21.   }
  22. }
  23. #-----------------
  24. /** Related note by TS-PI
  25.  
  26. "The good news is that the DMT messages are still there, and none of the underlying functions looks like they've been deleted, and NPF will aggressively try to send stats whenever there's room in a packet to do so... https://github.com/freenet/fred/blob/master/src/freenet/node/NewPacketFormat.java#L637" --     SSK@8kCqlpKwsXackbaIm7PI71gTfgRzZZScud4qfg8qcEU,6xAFCWENTik96iQyCuqRsYkWKbyhbpfdDUM22c71tqI,AQACAAE/ Re: Regarding Peer Count on 2018-10-05 18:30:09  from freenet board on fms (a usenet like plugin for freenet) */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement