v1.1.2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 13 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type BufPool

type BufPool struct {
	// contains filtered or unexported fields

func NewBufPool

func NewBufPool() *BufPool

func (*BufPool) Get

func (b *BufPool) Get() *bytes.Buffer

func (*BufPool) Return

func (b *BufPool) Return(buf *bytes.Buffer)

type Conn

type Conn struct {

	Sequence uint8
	// contains filtered or unexported fields

Conn is the base class to handle MySQL protocol.

func NewConn

func NewConn(conn net.Conn) *Conn

func NewTLSConn

func NewTLSConn(conn net.Conn) *Conn

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) ReadPacket

func (c *Conn) ReadPacket() ([]byte, error)

func (*Conn) ReadPacketReuseMem

func (c *Conn) ReadPacketReuseMem(dst []byte) ([]byte, error)

func (*Conn) ReadPacketTo

func (c *Conn) ReadPacketTo(w io.Writer) error

func (*Conn) ResetSequence

func (c *Conn) ResetSequence()

func (*Conn) WriteClearAuthPacket

func (c *Conn) WriteClearAuthPacket(password string) error

WriteClearAuthPacket: Client clear text authentication packet

func (*Conn) WriteEncryptedPassword

func (c *Conn) WriteEncryptedPassword(password string, seed []byte, pub *rsa.PublicKey) error

func (*Conn) WritePacket

func (c *Conn) WritePacket(data []byte) error

WritePacket: data already has 4 bytes header will modify data inplace

func (*Conn) WritePublicKeyAuthPacket

func (c *Conn) WritePublicKeyAuthPacket(password string, cipher []byte) error

WritePublicKeyAuthPacket: Caching sha2 authentication. Public key request and send encrypted password

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL