jsonp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InteractiveStatus   = uint16(1)
	InteractiveCmd      = uint16(100)
	InteractiveCmdAck   = uint16(102)
	InteractiveCmdReply = uint16(103)
)

Variables

This section is empty.

Functions

func NewInteractiveCmd

func NewInteractiveCmd(id, name, command, prompt, pre_prompt string, timeout int, close bool) (*interactiveCmd, uint16)

func NewInteractiveCmdAck

func NewInteractiveCmdAck(id string, count int) (*interactiveCmdAck, uint16)

func NewInteractiveCmdReply

func NewInteractiveCmdReply(id string, success bool, msg, output string) (*interactiveCmdReply, uint16)

func NewInteractiveStatus

func NewInteractiveStatus(total, active int) (*interactiveStatus, uint16)

func ReadJSON

func ReadJSON(c net.Conn, a any) error

func ReadMessage

func ReadMessage(c net.Conn) ([]byte, error)

func SendJSON

func SendJSON(c net.Conn, a any) error

func WriteMessage

func WriteMessage(m []byte, c net.Conn)

Types

type Message

type Message struct {
	Type uint16
	Raw  []byte
}

func NewMessage

func NewMessage(tp uint16, rawMsg interface{}) (*Message, error)

func (*Message) InteractiveCmd

func (m *Message) InteractiveCmd() (*interactiveCmd, error)

func (*Message) InteractiveCmdAck

func (m *Message) InteractiveCmdAck() (*interactiveCmdAck, error)

func (*Message) InteractiveCmdReply

func (m *Message) InteractiveCmdReply() (*interactiveCmdReply, error)

func (*Message) InteractiveStatus

func (m *Message) InteractiveStatus() (*interactiveStatus, error)

Jump to

Keyboard shortcuts

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