RED5 edge origin getReadBytes

View: New views
2 Messages — Rating Filter:   Alert me  

RED5 edge origin getReadBytes

by Dan Daemon-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello guys,

I have some problems with getting right bandwidth in EDGE -> ORIGIN configuration.

I use the code to get read bytes, something like:
===

private long getReadBytes() {

IConnection connection = Server.getConnectionLocal();

if( connection instanceof IStreamCapableConnection ) {

IStreamCapableConnection stream = (IStreamCapableConnection) connection;

return stream.getReadBytes();

}

return 0;

}


===

This code works properly if I use same server. But when I use edge -> origin
configuration this code ALWAYS returns 0....

What must I change? Or is there another way to determinate read bytes?

Thanks,
Dan

_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org

Re: RED5 edge origin getReadBytes

by Dan Daemon-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So, the problem is that Edge connection does not share information
with origin. As I can see from RED5 code there is the hint:

// TODO need to sync the bytes read on edge and origin


Anybody knows where can I read something and how to do synchronization?
Just need an idea for implementation...

On Wed, Nov 11, 2009 at 12:05 AM, Dan Daemon <dan.daemon@...> wrote:
Hello guys,

I have some problems with getting right bandwidth in EDGE -> ORIGIN configuration.

I use the code to get read bytes, something like:
===

private long getReadBytes() {

IConnection connection = Server.getConnectionLocal();

if( connection instanceof IStreamCapableConnection ) {

IStreamCapableConnection stream = (IStreamCapableConnection) connection;

return stream.getReadBytes();

}

return 0;

}


===

This code works properly if I use same server. But when I use edge -> origin
configuration this code ALWAYS returns 0....

What must I change? Or is there another way to determinate read bytes?

Thanks,
Dan


_______________________________________________
Red5 mailing list
Red5@...
http://osflash.org/mailman/listinfo/red5_osflash.org