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 and SebiWrn committed May 7, 2024
1 parent a49ade4 commit c2ec32f
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 c2ec32f

Please sign in to comment.