As the server classes of PyOPC are based on the Twisted framework, it is also utilized to set up the OPC server instance. This can be done as shown in listing 11, which implies the proper definition of the class ``MyXDAServer'', as already shown in listing 9.
Line 1-2 import all needed Twisted modules and create the PyOPC server object. In line 3, a Twisted resource object is created, where servers can be added, such as shown in line 4. Line 5-7 then starts the server. This server will then be reachable under the address ``http://server:8000/''.
A Twisted resource.Resource object is not limited to one PyOPC server instance, instead it is possible to add multiple server objects, such as shown in listing 12, which are then reachable under different URLs.