File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333from .status import BAD_REQUEST_400 , UNAUTHORIZED_401 , FORBIDDEN_403 , NOT_FOUND_404
3434
3535
36- NO_REQUEST = 0
37- CONNECTION_TIMED_OUT = 1
38- REQUEST_HANDLED_NO_RESPONSE = 2
39- REQUEST_HANDLED_RESPONSE_SENT = 3
36+ NO_REQUEST = "no_request"
37+ CONNECTION_TIMED_OUT = "connection_timed_out"
38+ REQUEST_HANDLED_NO_RESPONSE = "request_handled_no_response"
39+ REQUEST_HANDLED_RESPONSE_SENT = "request_handled_response_sent"
4040
4141
4242class Server : # pylint: disable=too-many-instance-attributes
@@ -324,12 +324,12 @@ def _set_default_server_headers(self, response: Response) -> None:
324324 name , value
325325 )
326326
327- def poll (self ) -> int :
327+ def poll (self ) -> str :
328328 """
329329 Call this method inside your main loop to get the server to check for new incoming client
330330 requests. When a request comes in, it will be handled by the handler function.
331331
332- Returns int representing the result of the poll
332+ Returns str representing the result of the poll
333333 e.g. ``NO_REQUEST`` or ``REQUEST_HANDLED_RESPONSE_SENT``.
334334 """
335335 if self .stopped :
You can’t perform that action at this time.
0 commit comments