Add document for custom protocol

This commit is contained in:
38elements
2016-12-29 13:11:27 +09:00
parent 39b279f0f2
commit 83e9d08853
5 changed files with 71 additions and 30 deletions

View File

@@ -251,7 +251,7 @@ class Sanic:
:param workers: Number of processes
received before it is respected
:param loop: asyncio compatible event loop
:param protocol: Subclass of asyncio.Protocol
:param protocol: Subclass of asyncio protocol class
:return: Nothing
"""
self.error_handler.debug = True

View File

@@ -245,7 +245,7 @@ def serve(host, port, request_handler, error_handler, before_start=None,
:param request_max_size: size in bytes, `None` for no limit
:param reuse_port: `True` for multiple workers
:param loop: asyncio compatible event loop
:param protocol: Subclass of asyncio.Protocol
:param protocol: Subclass of asyncio protocol class
:return: Nothing
"""
loop = loop or async_loop.new_event_loop()