func NewConnectionWithSize(addr string, dialTimeout time.Duration, readSize int, writeSize int) (*Conn, error) {
	conn, err := net.DialTimeout("tcp", addr, dialTimeout)
	if err != nil {
		return nil, errors.Trace(err)
	}

	return &Conn{
		addr:   addr,
		nc:     conn,
		closed: false,
		r:      bufio.NewReaderSize(conn, readSize),
		w:      bufio.NewWriterSize(conn, writeSize),
	}, nil
}
// NewConnectionWithSize creates a Conn with dial timeout and read/write buffer size.
NewConnectionWithSize creates a Conn with dial timeout and read/write buffer size.
// NewConnectionWithSize creates a Conn with dial timeout and read / write buffer size .
func NewConnectionWithSize(addr string, dialTimeout time.Duration, readSize int, writeSize int) (*Conn, error) {
	conn, err := net.DialTimeout("tcp", addr, dialTimeout)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &Conn{
		addr:   addr,
		nc:     conn,
		closed: false,
		r:      bufio.NewReaderSize(conn, readSize),
		w:      bufio.NewWriterSize(conn, writeSize),
	}, nil
}
func NewConnectionWithSize ( addr string , dialTimeout time . Duration , readSize int , writeSize int ) ( * Conn , error ) { conn , err := net . DialTimeout ( " " , addr , dialTimeout ) if err != nil { return nil , errors . Trace ( err ) } return & Conn { addr : addr , nc : conn , closed : false , r : bufio . NewReaderSize ( conn , readSize ) , w : bufio . NewWriterSize ( conn , writeSize ) , } , nil }
NewConnectionWithSize creates a Conn with dial timeout and read/write buffer size.
NewConnectionWithSize creates a Conn with dial timeout and read / write buffer size .