godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
959 stars 222 forks source link

Does we have any callbacks/ listerners on Connection or disconnection #341

Closed krishna13052001 closed 1 year ago

krishna13052001 commented 1 year ago

Hello all,

Does we have any connections or disconnections callbacks or listener’s with the BLE.

Which property tells the connections has been established or not?

guelfey commented 1 year ago

I'm not sure which kind of connections you're referring to and how BLE relates to this. For connections to the bus, all the functions / methods to creating it (e.g. SessionBus) are synchronous and return immediately whether the connection is successful or not, and if this connection is closed, all further methods on it will fail and blocked calls return https://pkg.go.dev/github.com/godbus/dbus/v5#Conn.Close. If you're using this library to communicate with some software that provides BLE connectivity, please refer to its documentation.