slnet

package
v0.0.0-...-bda7ca8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MessageHeaderSize = 8

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

func Dial

func Dial(ctx context.Context, addr string, timeout time.Duration) (*Conn, error)

func (*Conn) Close

func (tc *Conn) Close(ctx context.Context) error

func (*Conn) ReadUntil

func (tc *Conn) ReadUntil(ctx context.Context, _ []string) ([]byte, error)

func (*Conn) Send

func (tc *Conn) Send(ctx context.Context, buf []byte) (int, error)

func (*Conn) SendSensitive

func (tc *Conn) SendSensitive(ctx context.Context, buf []byte) (int, error)

type MessageHeader

type MessageHeader []byte

func (MessageHeader) Code

func (m MessageHeader) Code() uint16

func (MessageHeader) ID

func (m MessageHeader) ID() uint16

func (MessageHeader) Payload

func (m MessageHeader) Payload() []byte

func (MessageHeader) SetCode

func (m MessageHeader) SetCode(code uint16)

func (MessageHeader) SetID

func (m MessageHeader) SetID(id uint16)

func (MessageHeader) SetSize

func (m MessageHeader) SetSize(size uint32)

func (MessageHeader) Size

func (m MessageHeader) Size() uint32

Jump to

Keyboard shortcuts

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