foxglove / ws-protocol

Foxglove Studio WebSocket protocol specification and libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example_server_protobuf.cpp and example_server_flatbuffers.cpp imply incorrect behavior when (un)subscribe handler called

kyle-verdant opened this issue · comments

  hdlrs.subscribeHandler = [&](foxglove::ChannelId chanId, foxglove::ConnHandle) {
    std::cout << "first client subscribed to " << chanId << std::endl;
  };
  hdlrs.unsubscribeHandler = [&](foxglove::ChannelId chanId, foxglove::ConnHandle) {
    std::cout << "last client unsubscribed from " << chanId << std::endl;
  };

These handlers appear to use foxglove-websocket server behavior from a year ago - the current behavior is for the handler to be called once per client.