Auth support and arguments.

32 views
Skip to first unread message

Korcan Ergün

unread,
Mar 13, 2013, 12:05:57 AM3/13/13
to myproje...@googlegroups.com
First of all thanks for this great server.Now i am trying to stream my desktop over rtmplite. But for security reasons i have to add unique key mechanism for streams. But when i tried to pass arguments i cant handle this arguments in rtmplite. rtmplite creating 2 different applications for arguments.

Like APP0 - myapp?user=xxxx&pass=yyyy
       APP1 - myapp

But i just want to pass arguments to rtmplite.


How can i do this ?


Sorry for my bad english

Juan Ramírez

unread,
Mar 17, 2013, 1:12:38 AM3/17/13
to myproje...@googlegroups.com
If you are using the rtmp module you should do the following:

-> Create a class (Gateway) that inherits from rtmp.App
-> Instantiate the FlashServer class
-> call server.apps['myapp'] = Gateway
-> Implement the function Gateway.onConnect(self, client, *args)
-> -> Where client is an instance of rtmp.FlashClient

The client application should connect using something like the follogin:

conn = nnew NetConnection();
conn.connect("rtmp://myserver.com/myapp", "username", "password", "unique key", "whatever");

* Please double check the URL.

An now, on the server side, you could have another class like the following:

class DesktopServer(object):
    def __init__(self, client):
        self.client = client # the flash client instance
    def onConnect(user, password, uniquekey):
        # validate uniquekey and password for user
        # start sharing destkop

And that function could be called by Gateway like this:

class Gateway(App):
    def __init__(self):
        App.__init__(self)
    def onConnect(self, client, *args):
        App.onConnect(self, client, args)
        client.context = DesktopServer(self, client)
        desktopServer.onConnect(*args)

__________
Saludos!
     Juan



--
--
You received this message because you are subscribed to the Google
Groups "myprojectguide" group.
To post to this group, send email to myproje...@googlegroups.com
To unsubscribe from this group, send email to
myprojectguid...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/myprojectguide?hl=en
 
---
You received this message because you are subscribed to the Google Groups "myprojectguide" group.
To unsubscribe from this group and stop receiving emails from it, send an email to myprojectguid...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages