Compare commits
	
		
			2 commits
		
	
	
		
			a63d9d1e65
			...
			f09b261b62
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f09b261b62 | |||
| f1195d1f04 | 
					 4 changed files with 16 additions and 2 deletions
				
			
		
							
								
								
									
										1
									
								
								.envrc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.envrc
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					use nix
 | 
				
			||||||
| 
						 | 
					@ -89,12 +89,13 @@ int listen_loop(int port_number, backends::backend& be, bool tls) {
 | 
				
			||||||
        socket::anthracite_socket* client_sock;
 | 
					        socket::anthracite_socket* client_sock;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        if (tls){
 | 
					        if (tls){
 | 
				
			||||||
            client_sock = new socket::openssl_socket(*dynamic_cast<socket::openssl_socket*>(socket));
 | 
					            socket::openssl_socket* ssl_sock = dynamic_cast<socket::openssl_socket*>(socket);
 | 
				
			||||||
 | 
					            client_sock = new socket::openssl_socket(*ssl_sock);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            client_sock = new socket::anthracite_socket(*socket);
 | 
					            client_sock = new socket::anthracite_socket(*socket);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        std::thread(handle_client, socket, std::ref(be), std::ref(fb), std::ref(thread_wait_mutex), std::ref(thread_wait_condvar), std::ref(active_threads)).detach();
 | 
					        std::thread(handle_client, client_sock, std::ref(be), std::ref(fb), std::ref(thread_wait_mutex), std::ref(thread_wait_condvar), std::ref(active_threads)).detach();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    delete socket;
 | 
					    delete socket;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								shell.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								shell.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					{ pkgs ? import <nixpkgs> {} }:
 | 
				
			||||||
 | 
					  pkgs.mkShell {
 | 
				
			||||||
 | 
					    nativeBuildInputs = [ pkgs.pkg-config pkgs.openssl pkgs.libgcc pkgs.boost pkgs.cmake ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    shellHook = ''
 | 
				
			||||||
 | 
					      export OPENSSL_DIR="${pkgs.openssl.dev}"
 | 
				
			||||||
 | 
					      export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig"
 | 
				
			||||||
 | 
					      export OPENSSL_NO_VENDOR=1
 | 
				
			||||||
 | 
					      export OPENSSL_LIB_DIR="${pkgs.lib.getLib pkgs.openssl}/lib"
 | 
				
			||||||
 | 
					    '';
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@
 | 
				
			||||||
#include <sstream>
 | 
					#include <sstream>
 | 
				
			||||||
#include <unordered_map>
 | 
					#include <unordered_map>
 | 
				
			||||||
#include <vector>
 | 
					#include <vector>
 | 
				
			||||||
 | 
					#include <span>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using namespace anthracite;
 | 
					using namespace anthracite;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue