pub struct StreamSocketSynchronousProxy { /* private fields */ }Implementations§
Source§impl StreamSocketSynchronousProxy
impl StreamSocketSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<StreamSocketEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<StreamSocketEvent, 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 close(
&self,
___deadline: MonotonicInstant,
) -> Result<CloseableCloseResult, Error>
pub fn close( &self, ___deadline: MonotonicInstant, ) -> Result<CloseableCloseResult, Error>
Terminates the connection.
After calling Close, the client must not send any other requests.
Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling Close without knowing when the close has completed or its
status.
Sourcepub fn bind(
&self,
addr: &VsockAddress,
___deadline: MonotonicInstant,
) -> Result<StreamSocketBindResult, Error>
pub fn bind( &self, addr: &VsockAddress, ___deadline: MonotonicInstant, ) -> Result<StreamSocketBindResult, Error>
Bind this socket to a specific address.
Sourcepub fn connect(
&self,
remote_address: &VsockAddress,
___deadline: MonotonicInstant,
) -> Result<StreamSocketConnectResult, Error>
pub fn connect( &self, remote_address: &VsockAddress, ___deadline: MonotonicInstant, ) -> Result<StreamSocketConnectResult, Error>
Initiate a connection to |remote_address|. When the connection attempt completes the signal SIGNAL_STREAM_CONNECTED will be asserted on the data plane zx.Handle:SOCKET.
Sourcepub fn listen(
&self,
backlog: i32,
___deadline: MonotonicInstant,
) -> Result<StreamSocketListenResult, Error>
pub fn listen( &self, backlog: i32, ___deadline: MonotonicInstant, ) -> Result<StreamSocketListenResult, Error>
Places this socket into listening mode with a specified backlog. When a new connection is available the signal SIGNAL_STREAM_INCOMING will be asserted on the data plane zx.Handle:SOCKET.
Sourcepub fn accept(
&self,
want_addr: bool,
___deadline: MonotonicInstant,
) -> Result<StreamSocketAcceptResult, Error>
pub fn accept( &self, want_addr: bool, ___deadline: MonotonicInstant, ) -> Result<StreamSocketAcceptResult, Error>
Accepts a connection from this socket’s listen backlog and binds it to |socket| with data plane |data|. If |want_addr| is true, returns the address of the accepted socket. When this call returns, if SIGNAL_STREAM_INCOMING is asserted another incoming connection is available.
Sourcepub fn get_sock_name(
&self,
___deadline: MonotonicInstant,
) -> Result<StreamSocketGetSockNameResult, Error>
pub fn get_sock_name( &self, ___deadline: MonotonicInstant, ) -> Result<StreamSocketGetSockNameResult, Error>
Retrieves the local socket address.
Sourcepub fn get_peer_name(
&self,
___deadline: MonotonicInstant,
) -> Result<StreamSocketGetPeerNameResult, Error>
pub fn get_peer_name( &self, ___deadline: MonotonicInstant, ) -> Result<StreamSocketGetPeerNameResult, Error>
Retrieves the remote socket address.
Sourcepub fn get_error(
&self,
___deadline: MonotonicInstant,
) -> Result<StreamSocketGetErrorResult, Error>
pub fn get_error( &self, ___deadline: MonotonicInstant, ) -> Result<StreamSocketGetErrorResult, Error>
Get SOL_SOCKET -> SO_ERROR
Trait Implementations§
Source§impl Debug for StreamSocketSynchronousProxy
impl Debug for StreamSocketSynchronousProxy
Source§impl From<Channel> for StreamSocketSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for StreamSocketSynchronousProxy
Source§impl From<StreamSocketSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<StreamSocketSynchronousProxy> for Handle
Source§fn from(value: StreamSocketSynchronousProxy) -> Self
fn from(value: StreamSocketSynchronousProxy) -> Self
Source§impl FromClient for StreamSocketSynchronousProxy
Available on Fuchsia only.
impl FromClient for StreamSocketSynchronousProxy
Source§type Protocol = StreamSocketMarker
type Protocol = StreamSocketMarker
Source§fn from_client(value: ClientEnd<StreamSocketMarker>) -> Self
fn from_client(value: ClientEnd<StreamSocketMarker>) -> Self
Source§impl SynchronousProxy for StreamSocketSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for StreamSocketSynchronousProxy
Source§type Proxy = StreamSocketProxy
type Proxy = StreamSocketProxy
Source§type Protocol = StreamSocketMarker
type Protocol = StreamSocketMarker
Proxy controls.