12
									
								
								src/mock.rs
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/mock.rs
									
									
									
									
									
								
							| @@ -12,7 +12,7 @@ use solicit::http::frame::{SettingsFrame, Frame}; | ||||
| use solicit::http::connection::{HttpConnection, EndStream, DataChunk}; | ||||
|  | ||||
| use header::Headers; | ||||
| use net::{NetworkStream, NetworkConnector}; | ||||
| use net::{NetworkStream, NetworkConnector, SslClient}; | ||||
|  | ||||
| #[derive(Clone, Debug)] | ||||
| pub struct MockStream { | ||||
| @@ -315,3 +315,13 @@ impl NetworkConnector for MockHttp2Connector { | ||||
|         Ok(self.streams.borrow_mut().remove(0)) | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Debug, Default)] | ||||
| pub struct MockSsl; | ||||
|  | ||||
| impl<T: NetworkStream + Send + Clone> SslClient<T> for MockSsl { | ||||
|     type Stream = T; | ||||
|     fn wrap_client(&self, stream: T, _host: &str) -> ::Result<T> { | ||||
|         Ok(stream) | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user