netxclient

package
v3.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render added in v3.3.5

func Render(find string, variableMap map[string]any) string

Types

type Config

type Config struct {
	Network      string
	DialTimeout  time.Duration
	WriteTimeout time.Duration
	ReadTimeout  time.Duration
	RetryDelay   time.Duration
	ReadSize     int
	MaxRetries   int
}

type ConnSession added in v3.3.5

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

func NewConnSession added in v3.3.5

func NewConnSession(address string, conf Config, variableMap map[string]any) (*ConnSession, error)

func (*ConnSession) Address added in v3.3.5

func (s *ConnSession) Address() string

func (*ConnSession) Close added in v3.3.5

func (s *ConnSession) Close() error

func (*ConnSession) Receive added in v3.3.5

func (s *ConnSession) Receive(readSize int, readTimeout time.Duration) ([]byte, error)

func (*ConnSession) ReceiveUntil added in v3.3.5

func (s *ConnSession) ReceiveUntil(readSize int, readTimeout time.Duration, until string) ([]byte, error)

func (*ConnSession) Send added in v3.3.5

func (s *ConnSession) Send(payload []byte) error

type NetClient

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

func NewNetClient

func NewNetClient(address string, conf Config) (*NetClient, error)

func (*NetClient) Close

func (nc *NetClient) Close() error

func (*NetClient) Config

func (nc *NetClient) Config() *netx.Config

func (*NetClient) Request

func (nc *NetClient) Request(data, dataType string, variableMap map[string]any) error

type Session added in v3.2.8

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

func NewSession added in v3.2.8

func NewSession(address string, conf Config, variableMap map[string]any) (*Session, error)

func (*Session) Address added in v3.2.8

func (s *Session) Address() string

func (*Session) Close added in v3.2.8

func (s *Session) Close() error

func (*Session) Receive added in v3.2.8

func (s *Session) Receive() ([]byte, error)

func (*Session) Send added in v3.2.8

func (s *Session) Send(data []byte) error

Jump to

Keyboard shortcuts

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