part

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSerIsNil  = errors.New("ErrSerIsNil")
	ErrFileNoSet = errors.New("ErrFileNoSet")
	ErrhadStart  = errors.New("ErrhadStart")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Url      string
	SendChan chan interface{}
	RecvChan chan []byte

	TO     int
	Header map[string]string
	Proxy  string

	Ping Ping

	Msg_normal_close  string
	Func_normal_close func()
	Func_abort_close  func()
	// contains filtered or unexported fields
}

func New_client

func New_client(config Client) (o *Client)

func (*Client) Close

func (o *Client) Close()

func (*Client) Error

func (o *Client) Error() error

func (*Client) Handle

func (i *Client) Handle() (o *Client)

func (*Client) Heartbeat

func (o *Client) Heartbeat() (err error)

func (*Client) Isclose

func (o *Client) Isclose() bool

type Ping

type Ping struct {
	Msg    []byte
	Period int
	// contains filtered or unexported fields
}

type Recorder added in v0.10.0

type Recorder struct {
	Server *Server
	// contains filtered or unexported fields
}

func (*Recorder) Start added in v0.10.0

func (t *Recorder) Start(filePath string) error

func (*Recorder) Stop added in v0.10.0

func (t *Recorder) Stop()

type Server added in v0.3.9

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

func New_server added in v0.3.9

func New_server() *Server

func Play added in v0.10.0

func Play(filePath string, perReadSize int, maxReadSize int) (s *Server, close func())

func (*Server) Interface added in v0.3.9

func (t *Server) Interface() *mq.Msgq
			ws_mq.Push_tag(`send`,Uinterface{//just reply
				Id:tmp.Id,
				Data:tmp.Data,
			})
			//or
			ws_mq.Push_tag(`send`,Uinterface{//just reply
				Id:0,//send to all
				Data:tmp.Data,
			})
		}
		return false
	},
	`error`:func(data interface{})(bool){
		log.Println(data)
		return false
	},
})

func (*Server) Len added in v0.3.9

func (t *Server) Len() int64

func (*Server) WS added in v0.3.9

func (t *Server) WS(w http.ResponseWriter, r *http.Request) (o chan uintptr)

type Uinterface added in v0.3.9

type Uinterface struct {
	Id   uintptr
	Data []byte
}

Jump to

Keyboard shortcuts

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