client

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client client struct

func NewClient

func NewClient(addrName string, port int) *Client

NewClient get new udp client

func (*Client) Close

func (c *Client) Close()

func (*Client) Connect

func (c *Client) Connect() error

Connect connect

func (*Client) GetAddr

func (c *Client) GetAddr() tcpip.Address

GetAddr

func (*Client) GetNotify

func (c *Client) GetNotify() chan struct{}

GetNotify 获取事件chan

func (*Client) GetQueue

func (c *Client) GetQueue() *waiter.Queue

GetQueue 获取接收时间队列

func (*Client) GetRemoteAddr

func (c *Client) GetRemoteAddr() *tcpip.FullAddress

GetRemoteAddr

func (*Client) Read

func (c *Client) Read() ([]byte, error)

Read 一次性读取完缓冲区数据

func (*Client) Readn

func (c *Client) Readn(p []byte) (int, error)

Readn 读取固定字节的数据

func (*Client) Set

func (c *Client) Set(s *stack.Stack)

Set set options

func (*Client) Write

func (c *Client) Write(buf []byte) *tcpip.Error

Write

Jump to

Keyboard shortcuts

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