apakian / fluorinefx

Automatically exported from code.google.com/p/fluorinefx
0 stars 0 forks source link

RTMPT WaitForHandshake #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When using the RTMPT protocol, the WaitForHandshake scheduled on the 
RtmpServerConnection isn't doing anything since the handshaking process is done 
in the RtmptConnection. To prevent the RtmpServerConnection to be closed by 
this job, the OnInactive method does nothing if the protocol is tunneled.

As the result a connection which in fact is idle is not closed.

To fix this I changed the RtmpServerConnection class so that if contains a 
reference to the RtmptConnection. I also added another boolean variable 
HandshakeCompleted to the RtmpServer class, which is set to true by the 
UnscheduleWaitForHandshakeJob method.
The OnIdle method now checks this variable on the RtmptConnection - if the 
handshake wasn't completed it closes the RtmpServerConnection.

The RtmptServer.GetConnection has been changed to public method, so that the 
RtmpServerConnection can access the instance of the RtmptConnection.
I also added this method to the RtmptEndpoint ...

In the attachment you can find all of the changed files

Original issue reported on code.google.com by nikola.d...@gmail.com on 25 Aug 2010 at 12:54

Attachments: