utils

package
v0.0.0-...-e41ca22 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transfer

type Transfer struct {
	Conn net.Conn
	Buf  [8192]byte
}

这个结构体,完成对客户端发送和接收消息包的读取

func (*Transfer) ServerReadPackage

func (transfer *Transfer) ServerReadPackage() (msg common.Message, err error)

读取客户端发送的消息包,并封装到Message

func (*Transfer) ServerWritePackage

func (transfer *Transfer) ServerWritePackage(data []byte) (err error)

发送的消息包给客户端

Jump to

Keyboard shortcuts

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