From 81c9cece1fe36197d9a51b3c2592fc2d62823731 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 18 Nov 2022 11:38:58 -0500 Subject: [PATCH] update websocket message from binary to text for easier integration (#12) --- route/api_route_event.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/api_route_event.go b/route/api_route_event.go index 40f94a6..8f6187b 100644 --- a/route/api_route_event.go +++ b/route/api_route_event.go @@ -185,7 +185,7 @@ func (r *APIRoute) SubscribeEvent(c echo.Context, sourceID codegen.SourceID, par logger.Info("sending", zap.String("remote_addr", conn.RemoteAddr().String()), zap.String("message", string(message))) - if err := wsutil.WriteServerBinary(conn, message); err != nil { + if err := wsutil.WriteServerText(conn, message); err != nil { if _, ok := err.(*net.OpError); ok { logger.Info("ended", zap.String("error", err.Error())) } else {