network

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	END_DATA = '\n'
)

Variables

This section is empty.

Functions

func EncodeConnectionRPCData

func EncodeConnectionRPCData(method string, params any) *towgo.Jsonrpcrequest

func SplitBytes

func SplitBytes(input []byte, special []byte) ([]byte, []byte)

splitBytes 根据特殊字节切片的位置,将输入字节切片分割为两个部分

Types

type ConnectionPipe added in v1.0.4

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

func NewJsonrpcPipe added in v1.0.4

func NewJsonrpcPipe(baseConn io.ReadWriteCloser, rpcConn towgo.JsonRpcConnection) *ConnectionPipe

新建jsonrcp管道 实现数据透传

func (*ConnectionPipe) Call added in v1.0.4

func (c *ConnectionPipe) Call(method string, params any, destResult any) error

一次请求

func (*ConnectionPipe) Push added in v1.0.4

func (c *ConnectionPipe) Push(method string, params any) error

一次推送

Jump to

Keyboard shortcuts

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