|
webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
| def | __init__ (self, root_dir, scan_dir=None, allow_handlers_outside_root_dir=True) |
| def | add_resource_path_alias (self, alias_resource_path, existing_resource_path) |
| def | source_warnings (self) |
| def | do_extra_handshake (self, request) |
| def | transfer_data (self, request) |
| def | passive_closing_handshake (self, request) |
| def | get_handler_suite (self, resource) |
Dispatches WebSocket requests. This class maintains a map from resource name to handlers.
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.__init__ | ( | self, | |
| root_dir, | |||
scan_dir = None, |
|||
allow_handlers_outside_root_dir = True |
|||
| ) |
Construct an instance.
Args:
root_dir: The directory where handler definition files are
placed.
scan_dir: The directory where handler definition files are
searched. scan_dir must be a directory under root_dir,
including root_dir itself. If scan_dir is None,
root_dir is used as scan_dir. scan_dir can be useful
in saving scan time when root_dir contains many
subdirectories.
allow_handlers_outside_root_dir: Scans handler files even if their
canonical path is not under root_dir.
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.add_resource_path_alias | ( | self, | |
| alias_resource_path, | |||
| existing_resource_path | |||
| ) |
Add resource path alias.
Once added, request to alias_resource_path would be handled by
handler registered for existing_resource_path.
Args:
alias_resource_path: alias resource path
existing_resource_path: existing resource path
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.do_extra_handshake | ( | self, | |
| request | |||
| ) |
Do extra checking in WebSocket handshake.
Select a handler based on request.uri and call its
web_socket_do_extra_handshake function.
Args:
request: mod_python request.
Raises:
DispatchException: when handler was not found
AbortedByUserException: when user handler abort connection
HandshakeException: when opening handshake failed
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.get_handler_suite | ( | self, | |
| resource | |||
| ) |
Retrieves two handlers (one for extra handshake processing, and one for data transfer) for the given request as a HandlerSuite object.
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.passive_closing_handshake | ( | self, | |
| request | |||
| ) |
Prepare code and reason for responding client initiated closing handshake.
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.source_warnings | ( | self | ) |
Return warnings in sourcing handlers.
| def webkitpy.thirdparty.mod_pywebsocket.dispatch.Dispatcher.transfer_data | ( | self, | |
| request | |||
| ) |
Let a handler transfer_data with a WebSocket client.
Select a handler based on request.ws_resource and call its
web_socket_transfer_data function.
Args:
request: mod_python request.
Raises:
DispatchException: when handler was not found
AbortedByUserException: when user handler abort connection
1.8.13