java.lang.Object
net.i2p.client.streaming.impl.SchedulerImpl
net.i2p.client.streaming.impl.SchedulerPreconnect
All Implemented Interfaces:
TaskScheduler

class SchedulerPreconnectextends SchedulerImpl

Scheduler used for locally created connections where we have not yet sent the initial SYN packet.

Entry conditions:

  • Locally created
  • No packets sent or received

Events:

  • Message flush (explicitly, through a full buffer, or stream closure)
  • Initial delay timeout (causing implicit flush of any data available)

Next states:

  • Constructor Details

    • SchedulerPreconnect

      public SchedulerPreconnect(I2PAppContext ctx)
      Passes the context on to the shared scheduler base.
      Parameters:
      ctx - the application context whose clock, logging and rate statistics the inherited scheduler uses for the connect delay timer
  • Method Details

    • accept

      public boolean accept(Connection con)
      Accept locally created connections that haven't sent any packets yet.
      Parameters:
      con - the connection to check
      Returns:
      true if the connection is in the preconnect state
    • eventOccurred

      public void eventOccurred(Connection con)
      Handle an event on a preconnect connection. Sends the SYN when the connect delay has elapsed.
      Parameters:
      con - the connection that had an event