func (p *WebsocketConn) SetCounter(c *core.TrafficCounter) {
	p.counter = c
}
SetCounter bind a counter which can count r/w bytes.
package transport
import (
	"bytes"
	"io"
	"sync"
	"time"
	"github.com/gorilla/websocket"
	"github.com/pkg/errors"
	"github.com/rsocket/rsocket-go/core"
	"github.com/rsocket/rsocket-go/core/framing"
	"github.com/rsocket/rsocket-go/logger"
)
var _buffPool = sync.Pool{
	New: func() interface{} { return &bytes.Buffer{} },
}
type RawWebsocketConn interface {
	io.Closer
	SetReadDeadline(time.Time) error
	ReadMessage() (messageType int, p []byte, err error)
	WriteMessage(messageType int, data []byte) error
}
type WebsocketConn struct {
	c       RawWebsocketConn
	counter *core.TrafficCounter
}