mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-04 20:30:33 +00:00
Make manager references immutable
This commit is contained in:
parent
072701c379
commit
c1aaec6159
3 changed files with 6 additions and 6 deletions
|
@ -163,14 +163,14 @@ impl ConnectionManager for HttpManager {
|
|||
connection.proto == smoltcp::wire::IpProtocol::Tcp.into()
|
||||
}
|
||||
|
||||
fn new_connection(&mut self, connection: &Connection) -> Option<std::boxed::Box<dyn TcpProxy>> {
|
||||
fn new_connection(&self, connection: &Connection) -> Option<std::boxed::Box<dyn TcpProxy>> {
|
||||
if connection.proto != smoltcp::wire::IpProtocol::Tcp.into() {
|
||||
return None;
|
||||
}
|
||||
Some(std::boxed::Box::new(HttpConnection::new(connection)))
|
||||
}
|
||||
|
||||
fn close_connection(&mut self, _: &Connection) {}
|
||||
fn close_connection(&self, _: &Connection) {}
|
||||
|
||||
fn get_server(&self) -> SocketAddr {
|
||||
self.server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue