fermentord/vendor/github.com/JuulLabs-OSS/ble/conn.go
Søren Rasmussen 07a23c1845
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Upgrade to go 1.20 and add vendor catalog
2023-04-22 10:37:23 +02:00

38 lines
948 B
Go

package ble
import (
"context"
"io"
)
// Conn implements a L2CAP connection.
type Conn interface {
io.ReadWriteCloser
// Context returns the context that is used by this Conn.
Context() context.Context
// SetContext sets the context that is used by this Conn.
SetContext(ctx context.Context)
// LocalAddr returns local device's address.
LocalAddr() Addr
// RemoteAddr returns remote device's address.
RemoteAddr() Addr
// RxMTU returns the ATT_MTU which the local device is capable of accepting.
RxMTU() int
// SetRxMTU sets the ATT_MTU which the local device is capable of accepting.
SetRxMTU(mtu int)
// TxMTU returns the ATT_MTU which the remote device is capable of accepting.
TxMTU() int
// SetTxMTU sets the ATT_MTU which the remote device is capable of accepting.
SetTxMTU(mtu int)
// Disconnected returns a receiving channel, which is closed when the connection disconnects.
Disconnected() <-chan struct{}
}