fix config over tcp
This commit is contained in:
		
							parent
							
								
									06816a16ed
								
							
						
					
					
						commit
						0faf0c1773
					
				| @ -35,10 +35,10 @@ impl GenericListener { | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     pub fn bind(address: &String, type_lis: u8) -> Result<Self, String>{ | ||||
|     pub fn bind(port: &String, type_lis: u8) -> Result<Self, String>{ | ||||
|         let ret = match type_lis { | ||||
|             TCP_LIS => Self::new_tcp(TcpListener::bind(address).unwrap()), | ||||
|             UNIX_LIS => Self::new_unix(UnixListener::bind(address).unwrap()), | ||||
|             TCP_LIS => Self::new_tcp(TcpListener::bind(String::from("0.0.0.0:") +  port).unwrap()), | ||||
|             UNIX_LIS => Self::new_unix(UnixListener::bind(port).unwrap()), | ||||
|             _ => return Err("No valid option".to_string()), | ||||
|         }; | ||||
|         Ok(ret) | ||||
| @ -65,3 +65,4 @@ impl GenericListener { | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user