40 using wsT = uWS::WebSocket<false, true, HyperliquidPerSocketData>;
44 slick::queue<Request>& request_queue,
45 slick::queue<uint8_t>& market_data_queue);
48 void setup_routes(uWS::App &app)
override;
50 void handle_message(wsT* ws, std::string_view message);
51 void handle_info(uWS::HttpResponse<false>* res, uWS::HttpRequest* req);
56 void handle_close(wsT* ws,
int code, std::string_view message);
57 void send_error(wsT* ws,
const std::string& error_msg);
58 void unsubscribe_md(wsT* ws);
66 std::string upstream_base_url_;
68 std::unordered_set<wsT*> clients_;
70 std::unordered_map<std::string, std::unordered_multimap<uint8_t, wsT*>> symbol_channel_client_;
72 std::array<std::unordered_map<std::string, std::unordered_set<wsT*>>,
73 static_cast<uint8_t
>(HyperliquidChannel::__COUNT__)> subscription_info_;
75 std::unordered_map<std::string, std::pair<L2Levels, L2Levels>> l2_diff_baseline_;