pub struct TakeoverProxyState {
pub provider: TakeoverProviderKind,
pub display: String,
pub web_addr: SocketAddr,
pub window_manager: bool,
pub quality: u8,
/* private fields */
}Expand description
Minimal state used by the listener reverse proxy. Tests can construct this
without spawning KasmVNC; production keeps the process alive via _handle.
Fields§
§provider: TakeoverProviderKind§display: String§web_addr: SocketAddr§window_manager: boolA window manager is running, so the client can use resize=remote
(dynamic framebuffer fit) rather than the letterboxed resize=scale.
quality: u8Image quality 0-100 seeded onto the client (see host::bootstrap).
Implementations§
Source§impl TakeoverProxyState
impl TakeoverProxyState
pub fn new( provider: TakeoverProviderKind, handle: Arc<ProviderHandle>, quality: u8, ) -> Self
pub fn for_tests(web_port: u16) -> Self
Sourcepub async fn proxy(
self,
ws: Result<WebSocketUpgrade, WebSocketUpgradeRejection>,
uri: Uri,
request: Request,
) -> Response
pub async fn proxy( self, ws: Result<WebSocketUpgrade, WebSocketUpgradeRejection>, uri: Uri, request: Request, ) -> Response
Proxy an authenticated /takeover/panel request to the active provider.
Trait Implementations§
Source§impl Clone for TakeoverProxyState
impl Clone for TakeoverProxyState
Source§fn clone(&self) -> TakeoverProxyState
fn clone(&self) -> TakeoverProxyState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TakeoverProxyState
impl !UnwindSafe for TakeoverProxyState
impl Freeze for TakeoverProxyState
impl Send for TakeoverProxyState
impl Sync for TakeoverProxyState
impl Unpin for TakeoverProxyState
impl UnsafeUnpin for TakeoverProxyState
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