Connected to # of hubs

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

xforx
Posts: 7
Joined: 2003-12-10 14:15

Connected to # of hubs

Post by xforx » 2003-12-10 14:20

How can I check the number of currently connected hubs in DCpp, I guess there is some function that returns this, given that Hubs get this information somehow from the client I guess since there is no central server, alas I havn't been able to find it.

Thanks.

Twink
Posts: 436
Joined: 2003-04-01 04:31
Location: New Zealand

Post by Twink » 2003-12-10 22:46

Client has a static member called connections (or something like that) which has a count of the different types of hubs ur connected to (op, reg, and guest)

Pommes
Posts: 1
Joined: 2003-12-26 23:05

Post by Pommes » 2003-12-26 23:13

I didn't find it, can you be more precise (or how does it spell?)?

psf8500
Posts: 23
Joined: 2003-03-04 23:51

Post by psf8500 » 2003-12-27 00:51

Code: Select all

struct Counts {
      Counts(long n = 0, long r = 0, long o = 0) : normal(n), registered(r), op(o) { };
      long normal;
      long registered;
      long op;
      bool operator !=(const Counts& rhs) { return normal != rhs.normal || registered != rhs.registered || op != rhs.op; };
   };

   static Counts counts;

....

static string getCounts() {
      char buf[128];
      return string(buf, sprintf(buf, "%ld/%ld/%ld", counts.normal, counts.registered, counts.op));
   }


from client.h

Who is online

Users browsing this forum: Google [Bot] and 0 guests