summaryrefslogtreecommitdiff
path: root/websocket/_socket.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix logic bug in #893engn33r2023-02-051-1/+1
|
* Linting improvements, improved flake8 linting CI cmdengn33r2022-02-251-9/+6
|
* custom dispatcher pings/timeouts (#795)bubbleboy142022-02-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * rel example * tweaked rel example for linter * added rel note to examples.rst * slightly more compact example * added example header * matched wording * _socket.recv(): _recv() except socket.error - changed or to and; added except TimeoutError - raise WebSocketTimeoutException * _app - custom dispatcher check_callback() integration (and fixed pyevent compatibility): WrappedDispatcher (for use with generic event dispatchers such as pyevent and rel); create_dispatcher() accepts dispatcher kwarg (default None), and if it is specified, returns a WrappedDispatcher; use create_dispatcher() (passing specified dispatcher if any) every time (regardless of dispatcher specification) * Add clarifying comment, rerun CI tests * Add space to make linter happy Co-authored-by: engn33r <engn33r@users.noreply.github.com>
* Update copyright year to 2022engn33r2021-12-311-1/+1
|
* Py2->3: simplify class definition (#750)谭九鼎2021-10-201-1/+1
| | | Remove implied and redundant object class type declarations
* Transition from LGPL 2.1 license to Apache 2.0 - fix #697engn33r2021-08-101-13/+11
|
* Fix #205 by clarifying _socket.py exception textengn33r2021-05-171-1/+1
|
* First pass removing Python 2 code, mostly six dependencyengn33r2021-05-041-5/+3
|
* Update to use the selectors module with DefaultSelector (#568)Daan van Vugt2021-05-051-3/+13
| | | | | This works from python 3.4 onwards and provides the most efficient implementation depending on the current platform. https://docs.python.org/3/library/selectors.html#selectors.DefaultSelector
* PEP8 style compliance fixesengn33r2021-05-041-1/+0
|
* Fix #526 by reverting invalid BSD license migration in commit e94ed9e to ↵engn33r2021-02-221-2/+1
| | | | return to LGPL2.1
* Edit documentation to clarify timeout can be int or float (#654)engn33r2021-02-161-3/+3
|
* Add first draft of Sphinx documentationengn33r2021-01-311-2/+14
|
* Don't retry sockets with timeout set to 0Trygve Aaberge2019-03-201-2/+8
| | | | | | | | | | | | | | | | For non-blocking sockets with the timeout set to 0, the select call in _recv and _send will return immediately without the socket being ready. This causes _recv to return None, which makes recv close the connection. Since a select with a timeout of 0 right after recv/send is pointless, just skip _recv and _send when timeout is 0. As for the handling of SSLWantReadError, SSLWantWriteError, EAGAIN and EWOULDBLOCK in _recv/_send, websocket-client can't handle these without blocking. Since applications which has timeout set to 0 don't want websocket-client to block them, they have to handle those errors themselves. Fixes #535
* Fix SSL socket handling (#2)Juho Hovila2018-08-291-2/+36
| | | | | | | | | | * Fix ssl socket handling Handle them as recommended in here https://bugs.python.org/issue21430 and in python documentation. Do not use undocumented SSLSocket pending * Increase version
* Fixes raising WebSocketTimeoutException with SSLTim Rozet2018-01-231-1/+1
| | | | | | | | | | The previous message used for detecting SSL was too specific and was missing cases where SSL simply returned "timed out". This patch changes the detection to mirror what is done in the send for detecting timeouts. Fixes #387 Signed-off-by: Tim Rozet <tdrozet@gmail.com>
* revertHiroki Ohtani2018-01-221-1/+1
|
* fixed #3799Hiroki Ohtani2017-12-301-1/+1
|
* fixed #370Hiroki Ohtani2017-12-241-2/+3
|
* wsdump, test_fuzzingclient, websocket.*, test_websocket: Organise importsAllan Lewis2016-04-271-2/+2
| | | | | | | | | | | | | | Previously, because of the multiple instances of `from foo import *`, names were imported from modules that had themselves imported them, instead of from the place of definition. This commit therefore does the following: - Declares `__all__` in every module that imports anything, so that `from foo import *` is sane. - Sorts the imports based on conventions, similar to the output of `isort`. - Places all conditional imports after unconditional imports, except where that isn't valid. - Imports local names from the modules where they are defined, except when importing the package itself.
* websocket.*: [PEP 8] Use conventional line-length limitAllan Lewis2016-04-271-1/+2
| | | | Line length is set to 80 characters; tests are excluded.
* wsdump, websocket.*: [PEP 8] Use conventional vertical spacingAllan Lewis2016-04-271-0/+3
|
* _abnf, _socket: Don't override builtinsAllan Lewis2016-04-271-3/+3
|
* Not all exception messages are actually strings. For example SSLException ↵Eero Nevalainen2015-12-031-1/+1
| | | | seems to return just an integer error code from extract_err_message.
* Fix exception in recv() when ssl module is not availableAndrey Kosyakov2015-03-251-0/+1
|
* fixed #160 and some refactoringliris2015-03-251-1/+10
|
* add "__all__"Hiroki Ohtani2015-03-191-1/+6
|
* refactoring.Hiroki Ohtani2015-03-191-4/+3
|
* refactoringliris2015-03-131-4/+4
|
* refactoring.liris2015-03-131-0/+107