java.lang.Object
net.i2p.i2ptunnel.I2PTunnelRunner.RaceWin
Enclosing class:
I2PTunnelRunner

static final class I2PTunnelRunner.RaceWinextends Object
Winner of a dual-race empty retry: the socket that produced the first response byte, with a pushback stream that still holds that byte so the forwarder never loses the head of the response.
  • Field Details

    • sock

      final I2PSocket sock
      The socket that won the race, and so holds the connection the caller must use.
    • in

      final InputStream in
      The winning socket's pushback stream, positioned before the response byte.
  • Constructor Details

    • RaceWin

      RaceWin(I2PSocket sock, InputStream in)
      Bind a winning socket to the stream that reads its response.
      Parameters:
      sock - the socket that produced the first response byte
      in - the pushback stream over sock, holding that byte unread