packet

package
v0.0.0-...-aeea838 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	net.Conn

	Sequence uint8
}

Conn is the base class to handle MySQL protocol.

func NewConn

func NewConn(conn net.Conn) *Conn

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) ReadPacket

func (c *Conn) ReadPacket() ([]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 http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse

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 http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse

Jump to

Keyboard shortcuts

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