src/bin/proxmox-backup-proxy.rs: set socket options for max. performance
This commit is contained in:
		@ -95,7 +95,12 @@ fn run() -> Result<(), Error> {
 | 
				
			|||||||
            let connections = listener
 | 
					            let connections = listener
 | 
				
			||||||
                .incoming()
 | 
					                .incoming()
 | 
				
			||||||
                .map_err(Error::from)
 | 
					                .map_err(Error::from)
 | 
				
			||||||
                .and_then(move |sock| acceptor.accept(sock).map_err(|e| e.into()))
 | 
					                .and_then(move |sock| {
 | 
				
			||||||
 | 
					                    sock.set_nodelay(true).unwrap();
 | 
				
			||||||
 | 
					                    sock.set_send_buffer_size(1024*1024).unwrap();
 | 
				
			||||||
 | 
					                    sock.set_recv_buffer_size(1024*1024).unwrap();
 | 
				
			||||||
 | 
					                    acceptor.accept(sock).map_err(|e| e.into())
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
                .then(|r| match r {
 | 
					                .then(|r| match r {
 | 
				
			||||||
                    // accept()s can fail here with an Err() when eg. the client rejects
 | 
					                    // accept()s can fail here with an Err() when eg. the client rejects
 | 
				
			||||||
                    // the cert and closes the connection, so we follow up with mapping
 | 
					                    // the cert and closes the connection, so we follow up with mapping
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user