package handlers

import (
	"net/http"
	ws "stocksearch/websocket"
)

// WSHandler WebSocket 핸들러
type WSHandler struct {
	hub *ws.Hub
}

// NewWSHandler 핸들러 초기화
func NewWSHandler(hub *ws.Hub) *WSHandler {
	return &WSHandler{hub: hub}
}

// ServeWS GET /ws - WebSocket 연결 처리
func (h *WSHandler) ServeWS(w http.ResponseWriter, r *http.Request) {
	h.hub.ServeWS(w, r)
}
