Versions in this module Expand all Collapse all v0 v0.1.0 Mar 22, 2026 Changes in this version + func NewWSAuthPlugin() sdk.PluginProvider + func SetGlobalEnforcer(pe *ProtocolEnforcer) + type AuthenticatedConnection struct + ConnID string + HMACKey []byte + LastSeq uint64 + PlayerID string + PlayerType string + SessionID string + type ConnectionChallenge struct + Nonce string + ServerID string + Timestamp int64 + type HandshakeResponse struct + AuthToken string + PlayerType string + SDKVersion string + SessionID string + Signature string + type ProtocolEnforcer struct + OnAuthenticated func(connID, playerType, sessionID, playerID string) + OnDisconnect func(connID, playerID string) + SendFunc func(connID string, msg []byte) bool + func GetGlobalEnforcer() *ProtocolEnforcer + func NewProtocolEnforcer(sdkSecret []byte, serverID string) *ProtocolEnforcer + func (pe *ProtocolEnforcer) GetConnID(playerID string) string + func (pe *ProtocolEnforcer) GetConnection(connID string) (AuthenticatedConnection, bool) + func (pe *ProtocolEnforcer) GetPlayerID(connID string) string + func (pe *ProtocolEnforcer) HandleConnect(connID string) + func (pe *ProtocolEnforcer) HandleDisconnect(connID string) + func (pe *ProtocolEnforcer) HandleMessage(connID string, raw []byte) ([]byte, bool) + type SignedMessage struct + Payload []byte + Seq uint64 + Signature string