Interface Connection.UpgradeFrom

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer onUpgradeFrom()
      Invoked during an upgrade to produce a buffer containing bytes that have not been consumed by this connection, and that must be consumed by the upgrade-to connection.
    • Method Detail

      • onUpgradeFrom

        java.nio.ByteBuffer onUpgradeFrom()

        Invoked during an upgrade to produce a buffer containing bytes that have not been consumed by this connection, and that must be consumed by the upgrade-to connection.

        Returns:
        a buffer of unconsumed bytes to pass to the upgrade-to connection. The buffer does not belong to any pool and should be discarded after having consumed its bytes. The returned buffer may be null if there are no unconsumed bytes.