func (r *responseWriter) SetStatus(status ATTError) {
	r.status = status
}
SetStatus reports the result of the request.
package ble
import (
	"bytes"
	"context"
	"io"
)
type ReadHandler interface {
	ServeRead(req Request, rsp ResponseWriter)
}
type ReadHandlerFunc func(req Request, rsp ResponseWriter)
func (f ReadHandlerFunc) ServeRead(req Request, rsp ResponseWriter) {
	f(req, rsp)
}
type WriteHandler interface {
	ServeWrite(req Request, rsp ResponseWriter)
}
type WriteHandlerFunc func(req Request, rsp ResponseWriter)
func (f WriteHandlerFunc) ServeWrite(req Request, rsp ResponseWriter) {
	f(req, rsp)
}
type NotifyHandler interface {
	ServeNotify(req Request, n Notifier)
}
type NotifyHandlerFunc func(req Request, n Notifier)
func (f NotifyHandlerFunc) ServeNotify(req Request, n Notifier) {
	f(req, n)
}
type Request interface {
	Conn() Conn
	Data() []byte
	Offset() int
}
func NewRequest(conn Conn, data []byte, offset int) Request {
	return &request{conn: conn, data: data, offset: offset}
}
type request struct {
	conn   Conn
	data   []byte
	offset int
}
func (r *request) Conn() Conn   { return r.conn }
func (r *request) Data() []byte { return r.data }
func (r *request) Offset() int  { return r.offset }
type ResponseWriter interface {
	Write(b []byte) (int, error)
	Status() ATTError
	SetStatus(status ATTError)
	Len() int
	Cap() int
}
func NewResponseWriter(buf *bytes.Buffer) ResponseWriter {
	return &responseWriter{buf: buf}
}
type responseWriter struct {
	buf    *bytes.Buffer
	status ATTError
}
func (r *responseWriter) Status() ATTError {
	return r.status
}