pub struct ScoConnectionProxy { /* private fields */ }
Implementations§
Source§impl ScoConnectionProxy
impl ScoConnectionProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.bredr/ScoConnection.
Sourcepub fn take_event_stream(&self) -> ScoConnectionEventStream
pub fn take_event_stream(&self) -> ScoConnectionEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn read(
&self,
) -> QueryResponseFut<ScoConnectionReadResponse, DefaultFuchsiaResourceDialect>
pub fn read( &self, ) -> QueryResponseFut<ScoConnectionReadResponse, DefaultFuchsiaResourceDialect>
Read the next inbound SCO payload. Hangs until new data is received. Only one Read request may be pending at a time. Additional requests will result in protocol closure.
Sourcepub fn write(
&self,
payload: &ScoConnectionWriteRequest,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn write( &self, payload: &ScoConnectionWriteRequest, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Write data
to the SCO connection.
If Write tries to send more data than max_tx_data_size
, the protocol will be closed.
Only one Write request may be pending at a time. Additional requests will result in protocol
closure.
Sourcepub fn request_disconnect(&self) -> Result<(), Error>
pub fn request_disconnect(&self) -> Result<(), Error>
Request disconnect of the current connection. The server is expected to close the protocol once the underlying connection is disconnected. This can be used to order events to happen after the connection is dropped. If this is not necessary, the server will always disconnect the SCO when this protocol is closed by the client.
Trait Implementations§
Source§impl Clone for ScoConnectionProxy
impl Clone for ScoConnectionProxy
Source§fn clone(&self) -> ScoConnectionProxy
fn clone(&self) -> ScoConnectionProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ScoConnectionProxy
impl Debug for ScoConnectionProxy
Source§impl Proxy for ScoConnectionProxy
impl Proxy for ScoConnectionProxy
Source§type Protocol = ScoConnectionMarker
type Protocol = ScoConnectionMarker
Proxy
controls.