Struct wmproxy::CenterClient
source · pub struct CenterClient { /* private fields */ }
Expand description
中心客户端 负责与服务端建立连接,断开后自动再重连
Implementations§
source§impl CenterClient
impl CenterClient
pub fn new( option: ProxyConfig, server_addr: String, tls_client: Option<Arc<ClientConfig>>, domain: Option<String>, mappings: Vec<MappingConfig> ) -> Self
pub async fn connect(&mut self) -> ProxyResult<bool>
pub async fn serve(&mut self) -> ProxyResult<()>
pub async fn deal_new_stream<T>(&mut self, inbound: T) -> ProxyResult<()>
Auto Trait Implementations§
impl !RefUnwindSafe for CenterClient
impl Send for CenterClient
impl Sync for CenterClient
impl Unpin for CenterClient
impl !UnwindSafe for CenterClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more