Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60678

Add peek functionality to ASIOSession

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0-rc0, 5.0.7
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • v5.0
    • Service Arch 2021-11-01, Service Arch 2021-11-15
    • 3

      ASIOSession currently only supports read and write operations. In order to properly parse the proxy protocol (see SERVER-58496) it would be helpful to be able to peek at the channel to see what bytes we've received without consuming them from the underlying buffers (in case we read past the end of the proxy protocol header in the stream). In this ticket, add a peek buffer to the ASIOSession sockets which interacts correctly with the extant read functions. Peeking should be opportunistic and never block.

            Assignee:
            tyler.seip@mongodb.com Tyler Seip (Inactive)
            Reporter:
            tyler.seip@mongodb.com Tyler Seip (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: