• Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Provide a utility that would expose the remote receive-window size to a caller for a given TCP connection on the server. The following is an example of how we can query that form a TCP socket on Linux:

      void print_remote_window(int socket_fd) {
          struct tcp_info info;
          socklen_t len = sizeof(info);
      
          // Fetch internal TCP state from the Linux kernel
          if (getsockopt(socket_fd, IPPROTO_TCP, TCP_INFO, &info, &len) == 0) {
              // tcpi_snd_wnd is the peer's advertised receive window size in bytes
              std::cout << "Remote Receive Window Size: " << info.tcpi_snd_wnd << " bytes\n";
          } else {
              std::cerr << "Failed to get TCP_INFO: " << std::strerror(errno) << "\n";
          }
      }
      

            Assignee:
            Unassigned
            Reporter:
            Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: