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
use std::net::{TcpListener, SocketAddr, TcpStream, Shutdown, SocketAddrV4, Ipv4Addr}; | |
use std::str::FromStr; | |
use std::thread::{spawn, JoinHandle}; | |
use std::io::{BufReader, BufWriter, Read, Write}; | |
fn pipe(incoming: &mut TcpStream, outgoing: &mut TcpStream) -> Result<(), String> { | |
let mut buffer = [0; 1024]; | |
loop { | |
match incoming.read(&mut buffer) { | |
Ok(bytes_read) => { |
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
#include <stdlib.h> | |
#include <string.h> | |
#define INITIAL_SHIFT (((sizeof (long long)) - 1) * 010) | |
#define NTHREADS 64 | |
#define SWITCH_TO_INSERTION 16 | |
#define SWITCH_TO_QSORT 8192 | |
#define DO_NOT_RADIX 2626144 | |
/* |