Documentation ¶
Overview ¶
Package d2networking provides client and server implementations for OpenDiablo2.
The server is authoritative and communicates with local and remote clients over UDP.
Index ¶
Constants ¶
View Source
const ( ServerMinPlayers = 1 ServerMaxPlayersDefault = 8 )
ServerMinPlayers is the minimum number of players a server can have
Variables ¶
This section is empty.
Functions ¶
func StartDedicatedServer ¶
func StartDedicatedServer( manager *d2asset.AssetManager, in chan int, log chan string, l d2util.LogLevel, maxPlayers int, ) error
StartDedicatedServer Checks whether or not we should start a server i.e the -listen parameter has been passed in, and if so launches a server hosted to the network, in theory. (this is still WIP)
Types ¶
type ClientListener ¶
type ClientListener interface {
OnPacketReceived(packet d2netpacket.NetPacket) error
}
ClientListener is an interface used to pass packet data from ClientConnections to GameServer and GameClient.
type ServerEventFlag ¶
type ServerEventFlag = int
ServerEventFlag represents a server event
const (
ServerEventStop ServerEventFlag = iota
)
Server events
type ServerOptions ¶
ServerOptions represents game server options
Directories ¶
Path | Synopsis |
---|---|
Package d2client provides client side connection, map and entity management.
|
Package d2client provides client side connection, map and entity management. |
d2clientconnectiontype
Package d2clientconnectiontype provides types for client connections
|
Package d2clientconnectiontype provides types for client connections |
d2localclient
Package d2localclient facilitates communication between a local client and server.
|
Package d2localclient facilitates communication between a local client and server. |
d2remoteclient
Package d2remoteclient facilitates communication between a remote client and server.
|
Package d2remoteclient facilitates communication between a remote client and server. |
Package d2netpacket provides all of the different types of packets
|
Package d2netpacket provides all of the different types of packets |
d2netpackettype
Package d2netpackettype defines types which are encoded to JSON and sent in network packet payloads.
|
Package d2netpackettype defines types which are encoded to JSON and sent in network packet payloads. |
Package d2server provides connection management and client synchronization.
|
Package d2server provides connection management and client synchronization. |
d2tcpclientconnection
Package d2tcpclientconnection provides a TCP protocol implementation of a client connection
|
Package d2tcpclientconnection provides a TCP protocol implementation of a client connection |
d2udpclientconnection
Package d2udpclientconnection provides an implementation of a UDP client connection with a game state.
|
Package d2udpclientconnection provides an implementation of a UDP client connection with a game state. |
Click to show internal directories.
Click to hide internal directories.