uds

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package uds

Package uds

Package uds

Index

Constants

View Source
const (
	ErrAlreadyDial = "dial is already active"
	ErrDialClosed  = "dial is already closed"
)
View Source
const MaxReadSize = 4096

Variables

This section is empty.

Functions

func ModuleName added in v1.0.3

func ModuleName() string

ModuleName 模块名称

func SetResponseBuilder added in v1.1.12

func SetResponseBuilder(buildType int)

SetResponseBuilder 设置uds通信使用的流格式JSON YAML GOB FushinBuf

Types

type UDSClient

type UDSClient struct {
	Addr string

	MaxRecvSize int
	// contains filtered or unexported fields
}

func (*UDSClient) Close

func (c *UDSClient) Close() error

func (*UDSClient) Dial

func (c *UDSClient) Dial() error

Dial 连接指定的unix domain 在初始化后被调用连接

func (*UDSClient) Send

func (c *UDSClient) Send(req uds.Req) error

Send 发送请求 不接收服务端的返回数据 发送任意数据请使用SendRaw

func (*UDSClient) SendRaw

func (c *UDSClient) SendRaw(data string) error

SendRaw 发送raw的数据

func (*UDSClient) SendRawWithRes

func (c *UDSClient) SendRawWithRes(data string) ([]byte, error)

SendRawWithRes 发送raw数据并接收返回

func (*UDSClient) SendWithRes

func (c *UDSClient) SendWithRes(req uds.Req) (uds.Res, error)

SendWithRes 发送数据并尝试从服务端接收数据

Jump to

Keyboard shortcuts

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