pub struct StreamSocketProxy { /* private fields */ }Implementations§
Source§impl StreamSocketProxy
impl StreamSocketProxy
Sourcepub fn take_event_stream(&self) -> StreamSocketEventStream
pub fn take_event_stream(&self) -> StreamSocketEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn close(
&self,
) -> QueryResponseFut<CloseableCloseResult, DefaultFuchsiaResourceDialect>
pub fn close( &self, ) -> QueryResponseFut<CloseableCloseResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<StreamSocketBindResult, DefaultFuchsiaResourceDialect>
pub fn bind( &self, addr: &VsockAddress, ) -> QueryResponseFut<StreamSocketBindResult, DefaultFuchsiaResourceDialect>
Bind this socket to a specific address.
Sourcepub fn connect(
&self,
remote_address: &VsockAddress,
) -> QueryResponseFut<StreamSocketConnectResult, DefaultFuchsiaResourceDialect>
pub fn connect( &self, remote_address: &VsockAddress, ) -> QueryResponseFut<StreamSocketConnectResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<StreamSocketListenResult, DefaultFuchsiaResourceDialect>
pub fn listen( &self, backlog: i32, ) -> QueryResponseFut<StreamSocketListenResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<StreamSocketAcceptResult, DefaultFuchsiaResourceDialect>
pub fn accept( &self, want_addr: bool, ) -> QueryResponseFut<StreamSocketAcceptResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<StreamSocketGetSockNameResult, DefaultFuchsiaResourceDialect>
pub fn get_sock_name( &self, ) -> QueryResponseFut<StreamSocketGetSockNameResult, DefaultFuchsiaResourceDialect>
Retrieves the local socket address.
Sourcepub fn get_peer_name(
&self,
) -> QueryResponseFut<StreamSocketGetPeerNameResult, DefaultFuchsiaResourceDialect>
pub fn get_peer_name( &self, ) -> QueryResponseFut<StreamSocketGetPeerNameResult, DefaultFuchsiaResourceDialect>
Retrieves the remote socket address.
Sourcepub fn get_error(
&self,
) -> QueryResponseFut<StreamSocketGetErrorResult, DefaultFuchsiaResourceDialect>
pub fn get_error( &self, ) -> QueryResponseFut<StreamSocketGetErrorResult, DefaultFuchsiaResourceDialect>
Get SOL_SOCKET -> SO_ERROR
Trait Implementations§
Source§impl Clone for StreamSocketProxy
impl Clone for StreamSocketProxy
Source§fn clone(&self) -> StreamSocketProxy
fn clone(&self) -> StreamSocketProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamSocketProxy
impl Debug for StreamSocketProxy
Source§impl Proxy for StreamSocketProxy
impl Proxy for StreamSocketProxy
Source§type Protocol = StreamSocketMarker
type Protocol = StreamSocketMarker
Proxy controls.