network

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetPeer

type NetPeer struct {
	*peer.SafePeer
	// contains filtered or unexported fields
}

func NewNetPeer

func NewNetPeer(conn net.Conn, gs rua.GameServer) *NetPeer

Create a peer with a connection of `net.Conn`. If `timeout` == 0 (in ms), there is no timeout.

func (*NetPeer) WithBufSize

func (np *NetPeer) WithBufSize(n int) *NetPeer

func (*NetPeer) WithReadTimeout

func (np *NetPeer) WithReadTimeout(ms int) *NetPeer

func (*NetPeer) WithTimeout

func (np *NetPeer) WithTimeout(ms int) *NetPeer

Set the readTimeout and writeTimeout to the specified ms.

func (*NetPeer) WithWriteTimeout

func (np *NetPeer) WithWriteTimeout(ms int) *NetPeer

Jump to

Keyboard shortcuts

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