// NewClient returns an Attribute Protocol Client. func NewClient(l2c ble.Conn, h NotificationHandler) *Client { c := &Client{ l2c: l2c, rspc: make(chan []byte), chTxBuf: make(chan []byte, 1), rxBuf: make([]byte, ble.MaxMTU), chErr: make(chan error, 1), handler: h, } c.chTxBuf <- make([]byte, l2c.TxMTU(), l2c.TxMTU()) return c }