util

package
v0.0.0-...-a69ce32 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Htons

func Htons(i uint16) uint16

func ParseAddr

func ParseAddr(addr string) (ip string, port int)

func ReadFull

func ReadFull(reader io.Reader, buf []byte) (n int, err error)

func ReadPacket

func ReadPacket(reader io.Reader) ([]byte, error)

func WriteEnd

func WriteEnd(writer io.Writer) (n int, err error)

func WriteFull

func WriteFull(writer io.Writer, buf []byte) (n int, err error)

func WritePacket

func WritePacket(writer io.Writer, data []byte) (n int, err error)

func WriteUntil

func WriteUntil(conn net.Conn, bufSize int, data []byte, timeout time.Duration, fun func([]byte) bool) (res []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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