types

package
v0.0.0-...-5f3621a Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle(c *VncConn) error
}

Handler represents handler of handshake

type MessageListener

type MessageListener interface {
	Handle(c *VncConn)
}

type VncConn

type VncConn struct {
	C         net.Conn
	Br        *bufio.Reader
	Bw        *bufio.Writer
	Listeners []*MessageListener
	ErrCh     chan error
	QuitCh    chan error
}

func (*VncConn) AddListeners

func (c *VncConn) AddListeners(listener *MessageListener)

func (*VncConn) BufFlush

func (c *VncConn) BufFlush() error

BufFlush bufio Flush flushes data to conn

func (*VncConn) BufRead

func (c *VncConn) BufRead(buf []byte) (int, error)

BufRead bufio Read data from conn

func (*VncConn) BufWrite

func (c *VncConn) BufWrite(buf []byte) (int, error)

BufWrite bufio Write data to conn must be Flushed

func (*VncConn) Close

func (c *VncConn) Close() error

Close closing conn

func (*VncConn) Conn

func (c *VncConn) Conn() net.Conn

Conn return underlining net.Conn

func (*VncConn) GetListeners

func (c *VncConn) GetListeners() []*MessageListener

func (*VncConn) ListenChan

func (c *VncConn) ListenChan() (err error)

func (*VncConn) Read

func (c *VncConn) Read(data interface{}) error

func (*VncConn) ReadErrorReason

func (c *VncConn) ReadErrorReason() string

func (*VncConn) RunListeners

func (c *VncConn) RunListeners()

func (*VncConn) SetListeners

func (c *VncConn) SetListeners(listeners []*MessageListener)

func (*VncConn) Write

func (c *VncConn) Write(data interface{}) error

Jump to

Keyboard shortcuts

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