Neil Booth
6920747a5d
Move ping functionality into its own function.
First step in cleaning up the run() function.
Calls stop() rather than setting is_connected to False on
case of timeout, which cleanly closes the socket.
10 years ago
Neil Booth
c07e956127
Pass the response_queue to the constructor, not start().
Removes an unnecessary Thread base-class override. The python
documentation also strongly discourages overriding anything other
than run().
10 years ago
Neil Booth
9cf2eff16b
Make is_connected into a member function. No change in logic.
10 years ago
Neil Booth
4d55cb9528
First of several incremental patches tightening up interface.py.
Remove some unneeded imports, a constant and a line of dead code.
Document the current external API interface.py provides.
10 years ago
ThomasV
f32f1183fc
print_error methods. request timeout for interface
10 years ago
ThomasV
799a08514b
move proxy logic to network.py. reload socket module if proxy is disabled
10 years ago
ThomasV
ae7405a10f
remove old http interface code, not used
10 years ago
ThomasV
92987d9019
add comment about proxy side effect
10 years ago
ThomasV
73d8ba24d9
fix network connection issues
10 years ago
ThomasV
fdaf4e42a9
print reason if connection fails
10 years ago
ThomasV
b3364b87d1
interface: don't show traceback on error 104
10 years ago
ThomasV
992a634a77
serialize: handle case where proxy is None
10 years ago
ThomasV
30763a6555
fix config: serialize/deserialize proxy
10 years ago
ThomasV
c225795793
use ssl.PROTOCOL_SSLv23
10 years ago
Tafelpoot
d9c5250a6f
removed trailing whitespace and fixed indentation in history widget
10 years ago
ThomasV
60e5450a0e
rm print statement
10 years ago
ThomasV
0c0da6a36d
use certs from request module in interface.py
10 years ago
ThomasV
52450289ff
we must check host name if cert is signed by CA
10 years ago
ThomasV
889ac782c1
simplify interface.get_socket, and fix a bug with new certificates
10 years ago
ThomasV
dd849964d1
interface: forward errors
10 years ago
ThomasV
8ca42bbf43
accept ssl certs signed by CA
11 years ago
ThomasV
ae56de3160
rm dead code
11 years ago
ThomasV
3a9bb3cd43
interface: print debug message with the correct id
11 years ago
ThomasV
efa0972971
use ping time to determine if we are disconnected
11 years ago
ThomasV
411a87e0a3
fix disconnection error
11 years ago
ThomasV
58c817f81a
close interfaces on shutdown
11 years ago
ThomasV
44072a4f48
separate interface classes
11 years ago
ThomasV
ed8f9666df
remove interface.synchronous_get
11 years ago
ThomasV
fb878e1045
fix: catch server.version
11 years ago
ThomasV
28df27fba2
update interface.py
11 years ago
ThomasV
9efc25bdba
interface: use parse_json
11 years ago
ThomasV
9a07c1cb44
rename process_response
11 years ago
ThomasV
191520f064
interface.py: print -> print_error
11 years ago
ThomasV
f9985ae233
use x509 to check if server certificate has expired
11 years ago
ThomasV
80a988e337
slightly better notifications. at least, it fixes #652
11 years ago
ThomasV
696766c370
json-friendly debug messages. fix #659
11 years ago
ThomasV
268a099f87
sync_get
11 years ago
dmcdad
292ab39553
Update interface.py
Fix timeout problem under Python 2.7.1 where a socket.error 60 is thrown instead of socket.timeout exception.
11 years ago
ThomasV
f4f418e9ec
return message ids with send_http too
11 years ago
ThomasV
de94eaadeb
fix issue occuring with set_server
11 years ago
ThomasV
60b6fd399d
exit gracefully if host cannot be resolved. Fixes #488
11 years ago
ThomasV
cff8515e3c
on sl error: print exception inside for loop, and do not continue the loop
11 years ago
Emery Hemingway
8f87f7e954
IPv6 support
11 years ago
ThomasV
ee141f6d37
fix connect on windows
11 years ago
Bryan Stitt
225d8b83a3
don't use bare except
11 years ago
Bryan Stitt
f0eb0eccde
replace BaseException with Exception
11 years ago
ThomasV
83e699c314
sanitize server in interface.py (fix bug #309 )
11 years ago
ThomasV
d2af935fc7
use a regexp for the ssl bug workaround
11 years ago
ThomasV
f858f69c56
workaround android bug with ssl certificates
11 years ago
ThomasV
66f224eab4
update a few scripts
11 years ago