kcp

package
v0.0.0-...-445c181 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const IkcpOVERHEAD = 28

Variables

This section is empty.

Functions

func CurrentMs

func CurrentMs() uint32

Types

type KCP

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

func NewKCPWithToken

func NewKCPWithToken(conv, token uint32, callback KCPCallback) (*KCP, error)

func (*KCP) Check

func (k *KCP) Check(current uint32) uint32

func (*KCP) Free

func (k *KCP) Free()

func (*KCP) Input

func (k *KCP) Input(data []byte) int

func (*KCP) NoDelay

func (k *KCP) NoDelay(nodelay, interval, resend, nc int)

func (*KCP) Recv

func (k *KCP) Recv(data []byte) int

func (*KCP) Send

func (k *KCP) Send(data []byte) int

func (*KCP) SetMtu

func (k *KCP) SetMtu(mtu int)

func (*KCP) Update

func (k *KCP) Update(current uint32)

func (*KCP) WndSize

func (k *KCP) WndSize(sndWnd, rcvWnd int)

type KCPCallback

type KCPCallback = func(buf []byte, size int)

type ObjectId

type ObjectId uintptr

func NewObjectId

func NewObjectId(obj interface{}) ObjectId

func (*ObjectId) Free

func (id *ObjectId) Free() interface{}

func (ObjectId) Get

func (id ObjectId) Get() interface{}

func (ObjectId) IsNil

func (id ObjectId) IsNil() bool

type UserInfo

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

Jump to

Keyboard shortcuts

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