This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+-------------------------------------------------------------------+ | |
| | | |
| 13/27 16/30 | | |
| ^ ^ ^ ^ | | |
| +--++ +--+ | | |
| 0 4 5 6 7 8 9 12 9 26 | | | | |
| +--------------------------------------------+--++ | | |
| |XXXX||X||X||X||X||XXXX OR XXXXXXXXXXXXXXXX||XXXX| | | |
| +^--^--^--^--^--^--^--^----^--------------^--^--^+ | | |
| +--+ | | | | |--| +--------------+ +--+ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "TrackerWithHandshake" | |
version = "0.1.0" | |
authors = ["GGist <[email protected]>"] | |
[dependencies] | |
bip_handshake = "0.5" | |
bip_utracker = "0.3" | |
futures = "0.1" | |
tokio-core = "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "nom-test" | |
version = "0.1.0" | |
authors = ["Andrew <[email protected]>"] | |
[dependencies] | |
nom = "1.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "bencode_bench" | |
version = "0.1.0" | |
[dependencies] | |
# Iterative | |
# bip_bencode = { path = "./bip_bencode", git = "https://github.com/GGist/bip-rs.git", rev = "dde80c8" } | |
# Recursive | |
bip_bencode = { path = "./bip_bencode", git = "https://github.com/GGist/bip-rs.git", rev = "f818512" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "testing" | |
version = "0.1.0" | |
[dependencies] | |
bip_dht = "0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate sdl2; | |
use std::thread::{self}; | |
use sdl2::{Sdl}; | |
use sdl2::audio::{self, AudioSpecDesired, AudioSpecWAV, AudioCallback, AudioDevice}; | |
//----------------------------------------------------------------------------// | |
struct CopiedData { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define WIN32_LEAN_AND_MEAN | |
#include <winsock2.h> | |
#include <Ws2tcpip.h> | |
#include <mswsock.h> | |
#include <stdio.h> | |
int main() { | |
WSADATA wsaData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(udp, ip_addr, libc)] | |
extern crate libc; | |
use std::io::{Result, Error, ErrorKind}; | |
use std::net::{UdpSocket, ToSocketAddrs, SocketAddr, Ipv4Addr, IpAddr}; | |
use std::mem; | |
#[cfg(windows)] | |
pub type SockT = libc::SOCKET; |