pub struct SocketSynchronousProxy { /* private fields */ }Implementations§
Source§impl SocketSynchronousProxy
impl SocketSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<SocketEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<SocketEvent, 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 create_socket(
&self,
options: SocketType,
handles: &[NewHandleId; 2],
___deadline: MonotonicInstant,
) -> Result<SocketCreateSocketResult, Error>
pub fn create_socket( &self, options: SocketType, handles: &[NewHandleId; 2], ___deadline: MonotonicInstant, ) -> Result<SocketCreateSocketResult, Error>
Create a new socket in this FDomain and return both its ends.
Sourcepub fn set_socket_disposition(
&self,
handle: &HandleId,
disposition: SocketDisposition,
disposition_peer: SocketDisposition,
___deadline: MonotonicInstant,
) -> Result<SocketSetSocketDispositionResult, Error>
pub fn set_socket_disposition( &self, handle: &HandleId, disposition: SocketDisposition, disposition_peer: SocketDisposition, ___deadline: MonotonicInstant, ) -> Result<SocketSetSocketDispositionResult, Error>
Set the disposition of a given socket.
Sourcepub fn read_socket(
&self,
handle: &HandleId,
max_bytes: u64,
___deadline: MonotonicInstant,
) -> Result<SocketReadSocketResult, Error>
pub fn read_socket( &self, handle: &HandleId, max_bytes: u64, ___deadline: MonotonicInstant, ) -> Result<SocketReadSocketResult, Error>
Read data from a socket. This method will fail if the socket is currently being read asynchronously.
Sourcepub fn write_socket(
&self,
handle: &HandleId,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<SocketWriteSocketResult, Error>
pub fn write_socket( &self, handle: &HandleId, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<SocketWriteSocketResult, Error>
Write to a socket. This will attempt to write all the data passed, and
will block and retry whenever it is safe (e.g. it should never return
SHOULD_WAIT). The WriteSocketError contains a wrote parameter to
indicate if some bytes were written successfully before the failure
occurred.
Sourcepub fn read_socket_streaming_start(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<SocketReadSocketStreamingStartResult, Error>
pub fn read_socket_streaming_start( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<SocketReadSocketStreamingStartResult, Error>
Starts reading from the given socket. Data is returned via the SocketStreamingData event. That
event will occur repeatedly until ReadSocketStreamingStop is called for the same handle or the
event indicates the handle is closed.
Sourcepub fn read_socket_streaming_stop(
&self,
handle: &HandleId,
___deadline: MonotonicInstant,
) -> Result<SocketReadSocketStreamingStopResult, Error>
pub fn read_socket_streaming_stop( &self, handle: &HandleId, ___deadline: MonotonicInstant, ) -> Result<SocketReadSocketStreamingStopResult, Error>
Stop asynchronous reading from the given socket.
Trait Implementations§
Source§impl Debug for SocketSynchronousProxy
impl Debug for SocketSynchronousProxy
Source§impl From<Channel> for SocketSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for SocketSynchronousProxy
Source§impl From<SocketSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<SocketSynchronousProxy> for NullableHandle
Source§fn from(value: SocketSynchronousProxy) -> Self
fn from(value: SocketSynchronousProxy) -> Self
Source§impl FromClient for SocketSynchronousProxy
Available on Fuchsia only.
impl FromClient for SocketSynchronousProxy
Source§type Protocol = SocketMarker
type Protocol = SocketMarker
Source§fn from_client(value: ClientEnd<SocketMarker>) -> Self
fn from_client(value: ClientEnd<SocketMarker>) -> Self
Source§impl SynchronousProxy for SocketSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for SocketSynchronousProxy
Source§type Proxy = SocketProxy
type Proxy = SocketProxy
Source§type Protocol = SocketMarker
type Protocol = SocketMarker
Proxy controls.