Commit Graph

16 Commits

Author SHA1 Message Date
Peter Šurda 0324958e92
Peer discovery fixes
- incoming packets weren't correctly processed
2017-08-06 23:05:54 +02:00
Peter Šurda f338c00f8e
Change peer discovery tracking from queue to a dict
- with a queue, a situation could occur when new entries are appended
but nothing is polling the queue
2017-08-06 21:29:54 +02:00
Peter Šurda 8f14fb05a1
UDP socket setsockopt fix 2017-08-05 10:14:15 +02:00
Peter Šurda 2d7d9c2f92
Asyncore update
- request downloads in bigger chunks
- don't put whole objects into the receiveDataQueue
2017-07-08 06:54:25 +02:00
Peter Šurda 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
Peter Šurda 2685fe29b1
Code quality improvements 2017-06-24 12:13:35 +02:00
Peter Šurda a3a55e53c4
UDP Socket dict address fix
- fixes #1008
2017-06-11 14:11:39 +02:00
Peter Šurda 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
Peter Šurda 18988ae2e6
Asyncore updates
- performance optimisation, reduce number of loops when waiting
for protocol headers / commands
2017-05-31 10:17:36 +02:00
Peter Šurda 74f1a74a8c
Make SO_REUSEPORT optional
- apparently not available on Windows
2017-05-29 11:30:56 +02:00
Peter Šurda 65bb6648e7
Asyncore updates
- fix crash in inv thread
- more prints changed into logger
- minor fixes
2017-05-29 00:47:41 +02:00
Peter Šurda 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
Peter Šurda 21f6d38ec2
Asyncore fixes
- TCP fixes
2017-05-27 21:52:56 +02:00
Peter Šurda 99e714c432
UDP socket bugfixes 2017-05-27 20:43:27 +02:00
Peter Šurda fa9ad537a5
Add task_done to asyncore-related queues 2017-05-27 19:39:19 +02:00
Peter Šurda f8b4b427fc
Asyncore update
- bugfixes
- UDP socket for local peer discovery
- new function assembleAddr to unify creating address command
- open port checker functionality (inactive)
- sendBigInv is done in a thread separate from the network IO
thread
2017-05-27 19:09:21 +02:00