pub async fn connect_async<M: Message + Sync + Send>(
address: &str,
) -> Result<AsyncConnection<M>>Available on crate feature
tokio and (crate features std or tokio) only.Expand description
Connect asynchronously to a MAVLink node by address string.
The address must be in one of the following formats:
tcpin:<addr>:<port>to create a TCP server, listening for an incoming connectiontcpout:<addr>:<port>to create a TCP clientudpin:<addr>:<port>to create a UDP server, listening for incoming packetsudpout:<addr>:<port>to create a UDP clientudpbcast:<addr>:<port>to create a UDP broadcastserial:<port>:<baudrate>to create a serial connectionfile:<path>to extract file data, writing to such a connection does nothing
The address selects the transport stored in the returned connection.
ยงErrors
AddrNotAvailableif the address string could not be parsed as a valid MAVLink address- When the connection could not be established a corresponding
io::Erroris returned