tcpclient

package
v0.0.0-...-917d9ad Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LCS_Disconnected = iota
	LCS_Connecting
	LCS_Connected
	LCS_Disconnecting
)

Variables

This section is empty.

Functions

func Closed

func Closed()

Types

type AcceptMessage

type AcceptMessage struct {
}

type ClosedMessage

type ClosedMessage struct {
}

type Conn

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

func NewConn

func NewConn() *Conn

func (*Conn) Close

func (c *Conn) Close()

func (*Conn) Dial

func (c *Conn) Dial(addr string, timeout time.Duration) error

func (*Conn) EscalateFailure

func (c *Conn) EscalateFailure(reason interface{}, message interface{})

func (*Conn) IsConnected

func (c *Conn) IsConnected() bool

func (*Conn) Register

func (c *Conn) Register(key interface{}, f func(ctx context.Context, message proto.Message) error)

func (*Conn) RequestMessage

func (c *Conn) RequestMessage(message proto.Message, timeout int64) (proto.Message, error)

type ConnState

type ConnState int

type Future

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

func (*Future) Error

func (ref *Future) Error() error

Error 错误信息

func (*Future) Result

func (ref *Future) Result() proto.Message

Result 结果

func (*Future) Wait

func (ref *Future) Wait()

type IntervalLinkNode

type IntervalLinkNode struct {
	intrusive.LinkedNode
	Value interface{}
}

type PingMessage

type PingMessage struct {
}

type RecviceMessage

type RecviceMessage struct {
	Data []byte
	Addr net.Addr
}

Jump to

Keyboard shortcuts

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