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

Add peek functionality to ASIOSession

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3 Required
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Service Arch 2021-11-01, Service Arch 2021-11-15
    • Story Points:
      3

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tyler.seip Tyler Seip
              Reporter:
              tyler.seip Tyler Seip
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: