func (c *connector) InBuf() *ByteBuf {
	return c.in
}
InBuf returns internal bytebuf that used for read from client
package goetty
import (
	"errors"
	"net"
	"strings"
	"sync"
	"sync/atomic"
	"time"
)
var (
	ErrWrite = errors.New("goetty.net: Write failed")
	ErrEmptyServers = errors.New("goetty.Connector: Empty servers pool")
	ErrIllegalState = errors.New("goetty.Connector: Not connected")
)
type Conf struct {
	Addr                   string
	TimeoutConnectToServer time.Duration
	TimeWheel              *TimeoutWheel
	TimeoutWrite           time.Duration
	WriteTimeoutFn         func(string, IOSession)
}
type connector struct {
	sync.RWMutex
	cnf   *Conf
	attrs map[string]interface{}
	lastTimeout Timeout
	conn         net.Conn
	decoder      Decoder
	encoder      Encoder
	in           *ByteBuf
	out          *ByteBuf
	closed       int32
	writeBufSize int
	batchLimit uint64
	batchCount uint64
}
func NewConnector(cnf *Conf, decoder Decoder, encoder Encoder) IOSession {
	return NewConnectorSize(cnf, decoder, encoder, BufReadSize, BufWriteSize)
}
func NewConnectorSize(cnf *Conf, decoder Decoder, encoder Encoder, readBufSize, writeBufSize int) IOSession {
	return &connector{
		cnf:          cnf,
		in:           NewByteBuf(readBufSize),
		out:          NewByteBuf(writeBufSize),
		writeBufSize: writeBufSize,
		decoder:      decoder,
		encoder:      encoder,
		attrs:        make(map[string]interface{}),
	}
}