pub struct TcpProxyControlSynchronousProxy { /* private fields */ }
Implementations§
Source§impl TcpProxyControlSynchronousProxy
impl TcpProxyControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<TcpProxyControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<TcpProxyControlEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn open_proxy_(
&self,
target_port: u16,
proxy_port: u16,
tcp_proxy: ServerEnd<TcpProxy_Marker>,
___deadline: MonotonicInstant,
) -> Result<u16, Error>
pub fn open_proxy_( &self, target_port: u16, proxy_port: u16, tcp_proxy: ServerEnd<TcpProxy_Marker>, ___deadline: MonotonicInstant, ) -> Result<u16, Error>
Opens a proxy to the given |target_port|. If a proxy is already open for the specified |target_port|, the existing |open_port| is returned. The proxy remains open as long as at least a single client keeps their |proxy_token| handle for the specified |target_port|. Once all the |proxy_token| handles are closed, the proxy is closed. |proxy_port| is the source port where the proxy is opened. Except when the test running on remote host needs to reach a local device, its value is 0. This is only useful when the user has tunneled these ports to the local device and specified that port number as |proxy_port|.
Trait Implementations§
Source§impl SynchronousProxy for TcpProxyControlSynchronousProxy
impl SynchronousProxy for TcpProxyControlSynchronousProxy
Source§type Proxy = TcpProxyControlProxy
type Proxy = TcpProxyControlProxy
The async proxy for the same protocol.
Source§type Protocol = TcpProxyControlMarker
type Protocol = TcpProxyControlMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for TcpProxyControlSynchronousProxy
impl RefUnwindSafe for TcpProxyControlSynchronousProxy
impl Send for TcpProxyControlSynchronousProxy
impl Sync for TcpProxyControlSynchronousProxy
impl Unpin for TcpProxyControlSynchronousProxy
impl UnwindSafe for TcpProxyControlSynchronousProxy
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