1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-19 19:06:45 -05:00
OpenDiablo2/d2networking/d2server/client_connection.go
dk d56c4387ff
delint_d2networking (#599)
* delint_d2networking

not sure what to do about lint error G110 on calls to `io.Copy`, warns
about gzip compression bomb possibility, leaving those.

all todo's have been left.

* removed duplicate const
2020-07-17 22:11:16 -04:00

18 lines
581 B
Go

package d2server
import (
"github.com/OpenDiablo2/OpenDiablo2/d2game/d2player"
"github.com/OpenDiablo2/OpenDiablo2/d2networking/d2client/d2clientconnectiontype"
"github.com/OpenDiablo2/OpenDiablo2/d2networking/d2netpacket"
)
// ClientConnection is an interface for abstracting local and remote
// clients.
type ClientConnection interface {
GetUniqueID() string
GetConnectionType() d2clientconnectiontype.ClientConnectionType
SendPacketToClient(packet d2netpacket.NetPacket) error
GetPlayerState() *d2player.PlayerState
SetPlayerState(playerState *d2player.PlayerState)
}