autobahn.twisted.resource¶
Classes¶
Root resource when you want a WSGI resource be the default serving |
|
A Twisted Web resource for WebSocket. |
Module Contents¶
- class WSGIRootResource(wsgiResource, children)[source]¶
Bases:
twisted.web.resource.ResourceRoot resource when you want a WSGI resource be the default serving resource for a Twisted Web site, but have subpaths served by different resources.
This is a hack needed since twisted.web.wsgi.WSGIResource. does not provide a
putChild()method.
- class WebSocketResource(factory)[source]¶
Bases:
objectA Twisted Web resource for WebSocket.
- getChildWithDefault(name, request)[source]¶
This resource cannot have children, hence this will always fail.
- render(request)[source]¶
Render the resource. This will takeover the transport underlying the request, create a
autobahn.twisted.websocket.WebSocketServerProtocoland let that do any subsequent communication.