안녕하세요. coder/websocket + Echo v5에 관해 짧게 여쭤볼게요: Echo가 핸들러마다 전용 goroutine을 실행하니까, go readPump()를 추가하지 않고 그 goroutine에서 읽기 루프를 계속 돌려도 될까요?


func (endpoint *SocketEndpoint) ServeSocket(ctx echo.Context) error {

socket, _ := websocket.Accept(ctx.Response(), ctx.Request(), nil)

defer socket.CloseNow()

for { _, message, readErr := socket.Read(ctx.Request().Context()) if readErr != nil { return nil } endpoint.bus.Publish(message) }


}

동시 쓰기는 coder/websocket 안에서 관리하니까, 별도의 writePump goroutine 없이 허브가 직접 conn.Write()를 써도 되나요? 이런 구성이 맞을까요?