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)