Commit Graph

26 Commits

Author SHA1 Message Date
660997b8f4
Code Quality 2017-08-22 13:49:27 +02:00
cc955cd69d
Try new ports of binding fails
- API and BM protocol will try random ports for binding if those
configured are occupied
2017-08-09 17:29:23 +02:00
4564d37f5b
Typo in previous commits 2017-08-06 21:26:25 +02:00
38872159fb
Typo in previous commit 2017-08-06 20:40:35 +02:00
5895dc2f1f
Asyncore Windows error handling
- windows behaves somewhat differently when using select
2017-08-06 20:39:14 +02:00
5108d08ac9
Windows asyncore error handler fix
- WSAEWOULDBLOCK is now checked on connect and accept
2017-08-06 18:18:21 +02:00
a29f7534ee
Add EINTR handler for select and poll pollers 2017-07-21 09:06:02 +02:00
2530c62050
epoll throws IOError rather than select.error 2017-07-21 07:49:34 +02:00
ba4162d7fe
Asyncore update
- get rid of per-connection writeQueue/receiveQueue, and instead use
strings and locking
- minor code cleanup
- all state handlers now should set expectBytes
- almost all data processing happens in ReceiveDataThread, and
AsyncoreThread is almost only I/O (plus TLS). AsyncoreThread simply
puts the connection object into the queue when it has some data for
processing
- allow poll, epoll and kqueue handlers. kqueue is untested and
unoptimised, poll and epoll seem to work ok (linux)
- stack depth threshold handler  in decode_payload_content, this is
recursive and I think was causing occasional RuntimeErrors. Fixes #964
- longer asyncore loops, as now data is handled in ReceiveDataThread
- randomise node order when deciding what to download. Should prevent
retries being stuck to the same node
- socks cleanup (socks5 works ok, socks4a untested but should work too)
2017-07-06 19:45:36 +02:00
2685fe29b1
Code quality improvements 2017-06-24 12:13:35 +02:00
0cc8589b27
Asyncore updates
- should prevent the same object being re-requested indefinitely
- locking for object tracking
- move SSL-specific error handling to TLSDispatcher
- observe maximum connection limit when accepting a new connection
- stack depth test (for debugging purposes)
- separate download thread
- connection pool init moved to main thread
2017-06-21 12:16:33 +02:00
cba749088a
Asyncore updates
- mainly work on proxy support, but it's still not fully working
- minor bugfixes
2017-06-10 10:13:49 +02:00
e8d9a7f183
Asyncore connect handling
- minor improvements in handling of connect events so that it's not
processed twice
2017-06-03 16:30:05 +02:00
bdaa939e2c
ENOTSOCK fix 2017-05-29 13:39:26 +02:00
97c44b97f4
Asyncore update
- handle WSAENOTSOCK
2017-05-29 13:14:25 +02:00
a5c1b0c529
Asyncore fixes
- better handling of WSA* checks on non-windows systems
- handle EBADF on Windows/select
- better timeouts / loop lengths in main asyncore loop and
spawning new connections
- remove InvThread prints
2017-05-29 12:56:59 +02:00
c85d52b8e8
Asyncore updates
- asyncore is now on by default
- inv announcements implemented
- bandwidth limit implemented / fixed
- stats on download / upload speed now work
- make prints into logger
- limit knownNodes to 20k as it was before
- green light fixed
- other minor fixes
2017-05-29 00:24:07 +02:00
21f6d38ec2
Asyncore fixes
- TCP fixes
2017-05-27 21:52:56 +02:00
9683c879bc
Asyncore update
- Network status UI works but current speed isn't implemented yet
- Track per connection and global transferred bytes
- Add locking to write queue so that other threads can put stuff
there
- send ping on timeout (instead of closing the connection)
- implement open port checker (untested, never triggered yet)
- error handling on IO
2017-05-25 14:59:18 +02:00
fa56ab3e6f
Asyncore update
- better error handling
- bug fixes
- remove some debug output
2017-05-24 21:15:36 +02:00
d635e515b9
Big Asyncore update
- most of the stuff is done so it partially works
- disabled pollers other than select (debugging necessary)
- can switch in the settings, section network, option asyncore (defaults
to False)
2017-05-24 16:51:49 +02:00
96d58f3c11
Asyncore update (WIP) 2017-04-16 18:27:15 +02:00
46c9ea9403
Async network updates (WIP)
- cleaner command handling
- separating into header and command handling
- incoming connection handler
- bugfixes and more debug information
2017-03-20 18:32:26 +01:00
49869d0b56
Networking subsystem updates
- version command struct for faster unpacking
- increase read buffer to 2MB to allow a full command to fit
- initial bitmessage protocol class (WIP)
- error handling
- remove duplicate method
2017-03-11 11:12:08 +01:00
a1d1114cb2
New network subsystem updates
- auto-select select/poll/epoll/kqueue depending on what's available
2017-03-10 23:56:38 +01:00
998935be5f
New network subsystem, WIP
- finished proxy design
- socks4a and socks5 implemented
- authentication not tested
- resolver for both socks4a and socks5
- http client example using the proxy
2017-03-10 23:11:57 +01:00