bandwidth usage theory

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bandwidth usage theory

Aljoša Mohorović
i have a theory about bandwidth usage per application so any comments
or tips on how to implement this calculation would be appreciated.

if i set in appStart():
 - "private static long _bandwidth = 0";

and in appDisconnect():
  - "_bandwidth += connection.getReadBytes() + connection.getWrittenBytes()"

then i could create:
public long bandwidthUsage() {
    long bw = this._bandwidth;
    for(IConnection c:this.getConnections()) {
        bw += c.getReadBytes() + c.getWrittenBytes();
    }
}

my theory is based on assumption that IConnection getReadBytes() and
getWrittenBytes() contains all bandwidth. any comments/tips/better
ideas?

Aljosa Mohorovic

_______________________________________________
Red5 mailing list
[hidden email]
http://osflash.org/mailman/listinfo/red5_osflash.org
Reply | Threaded
Open this post in threaded view
|

bandwidth usage theory

Aljosa Mohorovic
i have a theory about bandwidth usage per application so any comments
or tips on how to implement this calculation would be appreciated.

if i set in appStart():
 - "private static long _bandwidth = 0";

and in appDisconnect():
  - "_bandwidth += connection.getReadBytes() + connection.getWrittenBytes()"

then i could create:
public long bandwidthUsage() {
    long bw = this._bandwidth;
    for(IConnection c:this.getConnections()) {
        bw += c.getReadBytes() + c.getWrittenBytes();
    }
}

my theory is based on assumption that IConnection getReadBytes() and
getWrittenBytes() contains all bandwidth. any comments/tips/better
ideas?

Aljosa Mohorovic

_______________________________________________
Red5 mailing list
[hidden email]
http://osflash.org/mailman/listinfo/red5_osflash.org