bittorrent's Introduction
bittorrent's People
bittorrent's Issues
Optimize threads with closing connections
After a thread has run its course, we should be able to close it and drop the connection so that we are not wasting space/cpu. For example, we can do this when a transfer is completed and the file is on the peer, it will not need any more outward requests so we can remove its threads looking for pieces.
Crunch Time v1
- Choke/unchoke timer/logic (download rates etc.)
- New
Logger
architecture to handle multiple peers on the same machine (so we can actually test) - Change
Message
architecture - Create
MessageDispatcher
Run remotely on CISE machines
File Chunker
Messages
Details
message length | message type | payload |
---|
- Message length: 4 byte field, specifies the message length in bytes
- Message type: Specifies the type of message. See below.
- Message payload: Variable size, varies by message type.
Message types
message type | value |
---|---|
choke | 0 |
unchoke | 1 |
interested | 2 |
not interested | 3 |
have | 4 |
bitfield | 5 |
request | 6 |
piece | 7 |
Message payloads
To do...
Handshake
Details
handshake header | zero bits | peer ID |
---|
- Handshake header: 18 byte string
"P2PFILESHARINGPROJ"
- Zero bits: 10 byte zero bits
- Peer ID: 4 byte integer representation of the peer ID
Complete remaining message handlers
Some handler delegate methods are stubbed rn, we need to implement them.
HandshakeMessage Struct
Logging System
File Handler
for a peer,
- determine what file-pieces peer has
- determine if peer has all file-pieces
- save file-piece
- compile file-pieces into complete file
FileHandler
Add functionality to FileHandler so we can utilize its data to compare/send pieces of the actual file being transferred.
Create test environment for generating list of peers and connecting
Times for getPreferredPeers() and getOptimisticallyUnchokedPeer()
Create the functions that will run on the given intervals for recalculating peers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.