Implement the http variant of the bank server.
During that process, many shortcomings with the socket server and the bank lib were fixed. I am aware a massive commit like this is not ideal.
This commit is contained in:
parent
c69654a924
commit
dac95b7dae
34 changed files with 1797 additions and 140 deletions
|
@ -33,7 +33,11 @@ pub fn run(host: &str, threads: usize) -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_connection(bank: Arc<RwLock<Bank>>, cmds: &Commands, mut stream: TcpStream) -> Result<()> {
|
||||
fn handle_connection(
|
||||
bank: Arc<RwLock<Bank>>,
|
||||
cmds: &Commands,
|
||||
mut stream: TcpStream,
|
||||
) -> Result<()> {
|
||||
const BUF_SIZE: usize = 64;
|
||||
|
||||
let mut data: Vec<u8> = vec![];
|
||||
|
@ -58,4 +62,3 @@ fn handle_connection(bank: Arc<RwLock<Bank>>, cmds: &Commands, mut stream: TcpSt
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue