pub struct Listener { /* private fields */ }
This is supported on crate feature rfcomm only.
Expand description

An RFCOMM socket server, listening for Stream connections.

Implementations

Creates a new Listener, which will be bound to the specified socket address.

Specify SocketAddr::any for any local adapter address with a dynamically allocated channel.

This will not register an SDP record for this channel. Register a Bluetooth RFCOMM profile instead, if you need a service record.

Accepts a new incoming connection from this listener.

Polls to accept a new incoming connection to this listener.

Constructs a new Listener from the given raw file descriptor.

The file descriptor must have been set to non-blocking mode.

This function consumes ownership of the specified file descriptor. The returned object will take responsibility for closing it when the object goes out of scope.

Safety

If the passed file descriptor is invalid, undefined behavior may occur.

Trait Implementations

Extracts the raw file descriptor. Read more

Performs the conversion.

Formats the value using the given formatter. Read more

Constructs a new instance of Self from the given raw file descriptor.

The file descriptor must have been set to non-blocking mode.

Panics

Panics when the conversion fails. Use Listener::from_raw_fd for a non-panicking variant.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.