Hi Abhishek,
Using Twisted, one doesn't directly create a protocol object.
You have to setup the Twisted reactor to listen on, or to connect to an address and a port, and to create protocol objects from the type you specify, one for every established connection.
There is a code snippet in OpenFaucet's documentation to start a controller:
http://rlenglet.github.com/openfaucet/controller.html#controller-instantiation
from twisted.internet import reactor
from openfaucet import ofcontroller
factory = ofcontroller.OpenflowControllerStubFactory(controller=MyController)
reactor.connectTCP('
switch1.example.com', 6633, factory)
reactor.run()
The address and port of your controller is what you should pass to the reactor.connectTCP() call.
If you switch were to be passive, you'd call reactor.listenTCP() instead of reactor.connectTCP().
Does that answer your question?
Regards,
--
Romain Lenglet