d2tcpclientconnection

package
v0.0.0-...-7f92c57 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package d2tcpclientconnection provides a TCP protocol implementation of a client connection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPClientConnection

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

TCPClientConnection represents a client connection over TCP

func CreateTCPClientConnection

func CreateTCPClientConnection(tcpConnection net.Conn, id string) *TCPClientConnection

CreateTCPClientConnection creates a new tcp client connection instance

func (TCPClientConnection) GetConnectionType

GetConnectionType returns an enum representing the connection type. See: d2clientconnectiontype.

func (*TCPClientConnection) GetPlayerState

func (t *TCPClientConnection) GetPlayerState() *d2hero.HeroState

GetPlayerState gets the game client player state

func (TCPClientConnection) GetUniqueID

func (t TCPClientConnection) GetUniqueID() string

GetUniqueID returns the unique ID for the tcp client connection

func (*TCPClientConnection) SendPacketToClient

func (t *TCPClientConnection) SendPacketToClient(p d2netpacket.NetPacket) error

SendPacketToClient marshals and sends (writes) NetPackets

func (*TCPClientConnection) SetPlayerState

func (t *TCPClientConnection) SetPlayerState(playerState *d2hero.HeroState)

SetPlayerState sets the game client player state

Jump to

Keyboard shortcuts

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