Skip to content

Commit 3e23e72

Browse files
committed
change writev_tls to write_tls
1 parent 57c518d commit 3e23e72

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/proxy/tcp_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::sync::Arc;
77
use bytes::BytesMut;
88
use mio::{Event, Poll, PollOpt, Ready, Token};
99
use mio::net::{TcpListener, TcpStream};
10-
use rustls::{ClientConfig, ClientSession, Session, WriteVAdapter};
10+
use rustls::{ClientConfig, ClientSession, Session};
1111
use webpki::DNSName;
1212

1313
use crate::config::Opts;
@@ -373,7 +373,7 @@ impl Connection {
373373
if !self.server_session.wants_write() {
374374
return;
375375
}
376-
match self.server_session.writev_tls(&mut WriteVAdapter::new(&mut self.server)) {
376+
match self.server_session.write_tls(&mut self.server) {
377377
Ok(size) => {
378378
log::debug!("connection:{} write {} bytes to server", self.index(), size);
379379
}

src/proxy/udp_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use bytes::BytesMut;
99
use mio::{Event, Poll, PollOpt, Ready, Token};
1010
use mio::net::TcpStream;
1111
use mio::net::UdpSocket;
12-
use rustls::{ClientConfig, ClientSession, Session, WriteVAdapter};
12+
use rustls::{ClientConfig, ClientSession, Session};
1313
use webpki::DNSName;
1414

1515
use crate::config::Opts;
@@ -247,7 +247,7 @@ impl Connection {
247247
if !self.server_session.wants_write() {
248248
break;
249249
}
250-
match self.server_session.writev_tls(&mut WriteVAdapter::new(&mut self.server)) {
250+
match self.server_session.write_tls(&mut self.server) {
251251
Ok(size) => {
252252
log::info!("connection:{} write {} bytes to server", self.index(), size);
253253
}

src/server/connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::time::Instant;
66
use bytes::{Buf, BytesMut};
77
use mio::{Event, Poll, PollOpt, Ready, Token};
88
use mio::net::{TcpStream, UdpSocket};
9-
use rustls::{ServerSession, Session, WriteVAdapter};
9+
use rustls::{ServerSession, Session};
1010

1111
use crate::config::Opts;
1212
use crate::proto::{CONNECT, MAX_UDP_SIZE, Sock5Address, TrojanRequest, UdpAssociate, UdpParseResult};
@@ -162,7 +162,7 @@ impl Connection {
162162
log::debug!("connection:{} finished proxy write", self.index);
163163
break;
164164
}
165-
match self.proxy_session.writev_tls(&mut WriteVAdapter::new(&mut self.proxy)) {
165+
match self.proxy_session.write_tls(&mut self.proxy) {
166166
Ok(size) => {
167167
log::debug!("connection:{} sent {} bytes to proxy", self.index, size);
168168
}

0 commit comments

Comments
 (0)