File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 33
33
from .status import BAD_REQUEST_400 , UNAUTHORIZED_401 , FORBIDDEN_403 , NOT_FOUND_404
34
34
35
35
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"
40
40
41
41
42
42
class Server : # pylint: disable=too-many-instance-attributes
@@ -324,12 +324,12 @@ def _set_default_server_headers(self, response: Response) -> None:
324
324
name , value
325
325
)
326
326
327
- def poll (self ) -> int :
327
+ def poll (self ) -> str :
328
328
"""
329
329
Call this method inside your main loop to get the server to check for new incoming client
330
330
requests. When a request comes in, it will be handled by the handler function.
331
331
332
- Returns int representing the result of the poll
332
+ Returns str representing the result of the poll
333
333
e.g. ``NO_REQUEST`` or ``REQUEST_HANDLED_RESPONSE_SENT``.
334
334
"""
335
335
if self .stopped :
You can’t perform that action at this time.
0 commit comments