tcp

package module
v0.0.0-...-5adb8dc Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PresentWriteProgress

type PresentWriteProgress func(n int)

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession(c net.Conn) *Session

func (*Session) Ack

func (s *Session) Ack() error

func (*Session) Close

func (s *Session) Close()

func (*Session) Fetch

func (s *Session) Fetch(msg *message.Message, data interface{}) (*message.Message, error)

func (*Session) Read

func (s *Session) Read(p []byte) (n int, err error)

func (*Session) ReadFile

func (s *Session) ReadFile(filepath string, md5 string, size int64) (written int64, err error)

func (*Session) ReadJson

func (s *Session) ReadJson(size int, v interface{}) error

func (*Session) ReadMessage

func (s *Session) ReadMessage() (*message.Message, error)

func (*Session) Send

func (s *Session) Send(msg *message.Message, data interface{}) error

func (*Session) SendFile

func (s *Session) SendFile(file_path string, pre_send func(filename string, md5 string, size int64) (offset int64, send bool)) error

func (*Session) SendMessage

func (s *Session) SendMessage(msg *message.Message, payload io.Reader, payload_size int64) error

func (*Session) String

func (s *Session) String() string

func (*Session) Write

func (s *Session) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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