Documentation ¶
Overview ¶
Package d2tcpclientconnection provides a TCP protocol implementation of a client connection
Index ¶
- type TCPClientConnection
- func (t TCPClientConnection) GetConnectionType() d2clientconnectiontype.ClientConnectionType
- func (t *TCPClientConnection) GetPlayerState() *d2hero.HeroState
- func (t TCPClientConnection) GetUniqueID() string
- func (t *TCPClientConnection) SendPacketToClient(p d2netpacket.NetPacket) error
- func (t *TCPClientConnection) SetPlayerState(playerState *d2hero.HeroState)
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 ¶
func (t TCPClientConnection) GetConnectionType() d2clientconnectiontype.ClientConnectionType
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
Click to show internal directories.
Click to hide internal directories.