server

package
v0.0.0-...-632c06c Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UDPServerClientLogicConnectionContext

type UDPServerClientLogicConnectionContext struct {
	LocalAddr net.UDPAddr

	TrackedConnection sync.Map //Key:UDPAddr Remote

	Conn net.Conn

	//Sending the first data packet and receiving data will refresh this
	LastSeen time.Time

	NoWait bool
	// contains filtered or unexported fields
}

type UDPServerContext

type UDPServerContext struct {
	TrackedRemoteAddr      sync.Map //Key:uint16 Channel
	ClientLogicConnection  sync.Map //Key:UDPAddr Client
	TxToClient             chan UDPServerTxToClientTraffic
	TxToClientData         chan UDPServerTxToClientDataTraffic
	RxFromClient           chan UDPServerRxFromClientTraffic
	ChannelNumberGenerator *channelNumberFinder.ChannelNumberFinder

	GetTransmitLayerSentRecvStatsInt interfaces.GetTransmitLayerSentRecvStats
	// contains filtered or unexported fields
}

func UDPServer

func UDPServer(context context.Context,
	TxToClient chan UDPServerTxToClientTraffic, TxToClientData chan UDPServerTxToClientDataTraffic,
	RxFromClient chan UDPServerRxFromClientTraffic,
	GetTransmitLayerSentRecvStatsInt interfaces.GetTransmitLayerSentRecvStats) *UDPServerContext

func (*UDPServerContext) IsChannelUsed

func (uscc *UDPServerContext) IsChannelUsed(u uint16) bool

func (*UDPServerContext) RxFromClientWorker

func (uscc *UDPServerContext) RxFromClientWorker()

Must in new goroutine, ALWAYS block!

type UDPServerContext_Opts

type UDPServerContext_Opts struct {
	UDPTimeoutTime int
}

type UDPServerRxFromClientTraffic

type UDPServerRxFromClientTraffic interfaces.TrafficWithChannelTag

type UDPServerTrackedRemoteAddrContext

type UDPServerTrackedRemoteAddrContext struct {
	RemoteAddr net.UDPAddr
	LocalAddr  net.UDPAddr
}

type UDPServerTxToClientDataTraffic

type UDPServerTxToClientDataTraffic interfaces.TrafficWithChannelTag

type UDPServerTxToClientTraffic

type UDPServerTxToClientTraffic interfaces.TrafficWithChannelTag

type UDPTrackedConnectionContext

type UDPTrackedConnectionContext struct {
	Tracking     bool
	TrackPending bool
	Tracked      bool
	Channel      uint16
}

Jump to

Keyboard shortcuts

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