prudp: DefaultstreamSettings -> DefaultStreamSettings

This commit is contained in:
Daniel López Guimaraes 2024-01-25 17:35:00 +00:00
parent 191455352a
commit 4683f67a04
No known key found for this signature in database
GPG key ID: 6AC74DE3DEF050E0

View file

@ -16,7 +16,7 @@ import (
type PRUDPEndPoint struct { type PRUDPEndPoint struct {
Server *PRUDPServer Server *PRUDPServer
StreamID uint8 StreamID uint8
DefaultstreamSettings *StreamSettings DefaultStreamSettings *StreamSettings
Connections *MutexMap[string, *PRUDPConnection] Connections *MutexMap[string, *PRUDPConnection]
packetEventHandlers map[string][]func(packet PacketInterface) packetEventHandlers map[string][]func(packet PacketInterface)
connectionEndedEventHandlers []func(connection *PRUDPConnection) connectionEndedEventHandlers []func(connection *PRUDPConnection)
@ -86,7 +86,7 @@ func (pep *PRUDPEndPoint) processPacket(packet PRUDPPacketInterface, socket *Soc
connection.DefaultPRUDPVersion = packet.Version() connection.DefaultPRUDPVersion = packet.Version()
connection.StreamType = streamType connection.StreamType = streamType
connection.StreamID = streamID connection.StreamID = streamID
connection.StreamSettings = pep.DefaultstreamSettings.Copy() connection.StreamSettings = pep.DefaultStreamSettings.Copy()
connection.startHeartbeat() connection.startHeartbeat()
// * Fail-safe. If the server reboots, then // * Fail-safe. If the server reboots, then
@ -610,7 +610,7 @@ func (pep *PRUDPEndPoint) FindConnectionByPID(pid uint64) *PRUDPConnection {
func NewPRUDPEndPoint(streamID uint8) *PRUDPEndPoint { func NewPRUDPEndPoint(streamID uint8) *PRUDPEndPoint {
return &PRUDPEndPoint{ return &PRUDPEndPoint{
StreamID: streamID, StreamID: streamID,
DefaultstreamSettings: NewStreamSettings(), DefaultStreamSettings: NewStreamSettings(),
Connections: NewMutexMap[string, *PRUDPConnection](), Connections: NewMutexMap[string, *PRUDPConnection](),
packetEventHandlers: make(map[string][]func(PacketInterface)), packetEventHandlers: make(map[string][]func(PacketInterface)),
connectionEndedEventHandlers: make([]func(connection *PRUDPConnection), 0), connectionEndedEventHandlers: make([]func(connection *PRUDPConnection), 0),