| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2005-10-08 | Have a peer event for keep alives too. Its only function is to log atm. | Richard Nyberg | |
| 2005-10-08 | Wait until we don't have any unanswered requests on a peer before | Richard Nyberg | |
| sending an uninterest message. | |||
| 2005-10-08 | Log keep alives. | Richard Nyberg | |
| 2005-10-08 | Accept pieces even if they arrive in a different order than the | Richard Nyberg | |
| requests were sent. | |||
| 2005-10-08 | Logging. | Richard Nyberg | |
| 2005-10-08 | Remove unsent requests from the write queue when we receive a choke. | Richard Nyberg | |
| 2005-10-06 | Enable all logging if DEBUG is defined. | Richard Nyberg | |
| 2005-10-06 | More logging: discarded pieces and peer_id. | Richard Nyberg | |
| 2005-10-06 | #include <limits.h> to be sure to get IOV_MAX. | Richard Nyberg | |
| Use the net_state enum and change some state names from NET_ to BTP_. Some minor type fixes. | |||
| 2005-10-05 | Fix two bugs. Add some logging. | Richard Nyberg | |
| 2005-10-05 | Remove unused constants. | Richard Nyberg | |
| 2005-10-05 | Code shuffle. | Richard Nyberg | |
| 2005-10-05 | Put the net state related data in its own sub struct. | Richard Nyberg | |
| Remove unneccesary use of struct io_buffer. | |||
| 2005-10-05 | Constify some functions. | Richard Nyberg | |
| Remove an unneccesary net state. Pass the char buffer directly to net_state instead of struct io_buf. | |||
| 2005-10-04 | net_state should return ssize_t not int. | Richard Nyberg | |
| removed some deug logging. | |||
| 2005-10-04 | Better method of reading data from peers. btpd could send data to peers | Richard Nyberg | |
| that had closed the at least one direction of the connection. That feature was probably unneccesary. Removed it for now. | |||
| 2005-10-04 | Rewrite of the code for receiving data from peers. | Richard Nyberg | |
| It's not quite how I want it yet, but it's getting there. | |||
| 2005-10-01 | More logging. | Richard Nyberg | |
| 2005-09-30 | Changes for 0.6. | Richard Nyberg | |
| 2005-09-24 | In the transition to end game it's likely that we'll send an uniterest | Richard Nyberg | |
| message followed by an interest message. Optimize this but not sending those messages in that case. This is better becasue we don't risk to trigger a choke from the receiving peer. | |||
| 2005-09-23 | Send a new request to a peer after sending cancel. | Richard Nyberg | |
| 2005-09-21 | x | Richard Nyberg | |
| 2005-09-21 | Bump version to 0.6. | Richard Nyberg | |
| 2005-09-20 | * Allocate request messages on piece creation. The request objects can | Richard Nyberg | |
| be shared by several peers. At least in end game. * Link blocks with the peers we are loading them from and vice versa. * Limit the number of requests / peer in end game too. * Improve end game by using some sort of round robin for block requests. | |||
| 2005-09-20 | Use the piece destructor. | Richard Nyberg | |
| 2005-09-20 | Add some macros. | Richard Nyberg | |
| 2005-09-10 | Simplify the autocrap somewhat. Always include the #defines needed | Richard Nyberg | |
| to build with glibc. | |||
| 2005-08-30 | Remove a bad assert. The test can be true during normal operation. | Richard Nyberg | |
| 2005-08-12 | Set an upper limit on how many piece messages to queue for | Richard Nyberg | |
| writing to a peer. If more requests arrive they will be ignored. When all pieces have been sent to the peer, in order for it not to wait on the ignored requests, its state will be reset by a choke followed by an unchoke message. Without this limit there was no bound on how much memory btpd would consume to satisfy a greedy peer. | |||
| 2005-08-03 | Only allocate one have message for all peers, instead of one per peer. | Richard Nyberg | |
| 2005-08-02 | * Rearrange some code. Mostly from net to net_buf and peer. | Richard Nyberg | |
| * Use the new net_bufs where it makes sense. * Take advantage of the reference count on net_bufs and only allocate the (un)choke and (un)interest messages once. | |||
| 2005-08-02 | The fix for bitfield in r59 wasn't quite correct. Instead of | Richard Nyberg | |
| being sent too early it could now be sent too late. Change version to 0.5 and document the bug fix. | |||
| 2005-07-31 | Wrong logmask was used. | Richard Nyberg | |
| 2005-07-31 | Set version to 0.4. | Richard Nyberg | |
| 2005-07-31 | Add items for 0.4. | Richard Nyberg | |
| 2005-07-30 | Spelling. | Richard Nyberg | |
| 2005-07-30 | Removed the info entry in the net_buf. The information can easily | Richard Nyberg | |
| be extracted from the buffer data instead. Created functions to do that. | |||
| 2005-07-30 | Better tests. peer_laden is needed beacuse the peer might have | Richard Nyberg | |
| gotten new request if the piece was fully downloaded and found to be bad. | |||
| 2005-07-30 | Fix style. Remove unnecessary check for EINTR. | Richard Nyberg | |
| 2005-07-30 | All files: | Richard Nyberg | |
| Each piece must have at least one byte for their block bit array, or they will collide causing great confusion in btpd. The calculation was done wrong so this could happen for small torrents (blocks / piece < 8). policy_subr.c: * Add test for correctness. * Add missing call to cm_on_piece_full in cm_new_piece. | |||
| 2005-07-30 | * Don't hold a net_buf on allocation. Do it when it's really needed instead. | Richard Nyberg | |
| * Add function net_unsend to safely remove network buffers from a peer's outq. Use it where needed in peer.c. | |||
| 2005-07-29 | Make sure we don't empty the outq and leave the write callback enabled. | Richard Nyberg | |
| 2005-07-29 | Remove dead code. | Richard Nyberg | |
| 2005-07-29 | Rework the outgoing network buffers. The buffers now contain more | Richard Nyberg | |
| information on what data they hold, making it unnecessary to have other lists tracking that information. Also they now have a reference count, making it possible to use the same buffer on many peers. This is only a start though. I've just done enough for btpd to work, I haven't taken advantage of the reference count yet. | |||
| 2005-07-29 | Missing space. | Richard Nyberg | |
| 2005-07-29 | Queue the bitfield for sending after the handshake is completed. | Richard Nyberg | |
| This fixes a bug where peer could miss pieces btpd got while the peer was in handshake. Also, btpd now sends multiple have messages instead of a bitfield when it's better to do so. | |||
| 2005-07-29 | At each bandwidth call the remaining bandwidht counter is set to limit / hz. | Richard Nyberg | |
| Since the set hz is (almost) never achieved the denominator is now based on the average hz the last 5 seconds. | |||
| 2005-07-23 | Spelling. | Richard Nyberg | |
| 2005-07-23 | Use the old simpler bandwidth limiter, but run it at a configurable rate. | Richard Nyberg | |
| Let the default be 8 hz for now. Removed a try at time correction. I don't really think it'll matter and there was a potential bug if the clock went backwards. Removed net_by_second. Let the peer bandwidth calculation be handled in cm_by_second. | |||
| 2005-07-22 | Set a 60s timeout on writes. If a write times ut the peer in question will | Richard Nyberg | |
| be killed. | |||