Commit Graph

19 Commits

Author SHA1 Message Date
4c9006a632
Asyncore performance optimisation
- use bytearray instead of strings for buffers
2017-10-16 08:07:32 +02:00
a49b3b5f84
Asyncore UDP fix
- when there was an error writing to a udp socket, it wasn't
handled correctly
2017-10-06 18:26:06 +02:00
0b07b1c89a
Peer discovery updates
- allow loopback addresses, now you can bind different loopback IP
addresses on a single system and they will auto-cross-connect
- always listen for discovery on 0.0.0.0
- [network] - bind now also applies for the TCP socket as well as UDP
socket
- closing socket iterator fix
2017-08-09 17:34:47 +02:00
0324958e92
Peer discovery fixes
- incoming packets weren't correctly processed
2017-08-06 23:05:54 +02:00
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
8f14fb05a1
UDP socket setsockopt fix 2017-08-05 10:14:15 +02:00
2d7d9c2f92
Asyncore update
- request downloads in bigger chunks
- don't put whole objects into the receiveDataQueue
2017-07-08 06:54:25 +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
a3a55e53c4
UDP Socket dict address fix
- fixes #1008
2017-06-11 14:11:39 +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
18988ae2e6
Asyncore updates
- performance optimisation, reduce number of loops when waiting
for protocol headers / commands
2017-05-31 10:17:36 +02:00
74f1a74a8c
Make SO_REUSEPORT optional
- apparently not available on Windows
2017-05-29 11:30:56 +02:00
65bb6648e7
Asyncore updates
- fix crash in inv thread
- more prints changed into logger
- minor fixes
2017-05-29 00:47:41 +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
99e714c432
UDP socket bugfixes 2017-05-27 20:43:27 +02:00
fa9ad537a5
Add task_done to asyncore-related queues 2017-05-27 19:39:19 +02:00
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