uds

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

This section is empty.

Types

type UDSClient

type UDSClient struct {
	Addr string
	// 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) (res uds.Res, err error)

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

Jump to

Keyboard shortcuts

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