olahol / melody

:notes: Minimalist websocket framework for Go
BSD 2-Clause "Simplified" License
3.76k stars 365 forks source link

add Custom configuration #88

Open valiner opened 1 year ago

valiner commented 1 year ago

No description provided. type Config struct { WriteWait time.Duration // Milliseconds until write times out. PongWait time.Duration // Timeout for waiting on pong. PingPeriod time.Duration // Milliseconds between pings. MaxMessageSize int64 // Maximum size in bytes of a message. MessageBufferSize int // The max amount of messages that can be in a sessions buffer before it starts dropping them. }

When creating an instance, support configuration config