Skip to content

Commit

Permalink
melody confis maxmessage size icnrease so that longer msgs can be sen…
Browse files Browse the repository at this point in the history
…t while chatting (#1324)
  • Loading branch information
barisgul15 authored Apr 23, 2024
1 parent f2c02cd commit bf2f11e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/realtime/connector/melody.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package connector

import (
"net/http"

"github.com/TUM-Dev/gocast/tools/realtime"
"github.com/gabstv/melody"
)

func NewMelodyConnector() *realtime.Connector {
melodyInstance := melody.New()
melodyInstance.Config.MaxMessageSize = 1200
// 1200 bytes allow a little more than 1000 chars.
connector := realtime.NewConnector(
func(writer http.ResponseWriter, request *http.Request, properties map[string]interface{}) error {
return melodyInstance.HandleRequestWithKeys(writer, request, properties)
Expand Down

0 comments on commit bf2f11e

Please sign in to comment.