Tabnine Logo
SessionConfig.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
net.i2p.data.i2cp.SessionConfig
constructor

Best Java code snippets using net.i2p.data.i2cp.SessionConfig.<init> (Showing top 8 results out of 315)

origin: i2p/i2p.i2p

public CreateSessionMessage() {
  _sessionConfig = new SessionConfig();
}
origin: i2p/i2p.i2p

  public DataStructure createStructureToRead() { return new SessionConfig(); }
}
origin: i2p/i2p.i2p

@Override
protected void doReadMessage(InputStream in, int size) throws I2CPMessageException, IOException {
  SessionConfig config = new SessionConfig();
  try {
    config.readBytes(in);
  } catch (DataFormatException dfe) {
    throw new I2CPMessageException("Unable to load the session configuration", dfe);
  }
  setSessionConfig(config);
}
origin: i2p/i2p.i2p

@Override
protected void doReadMessage(InputStream in, int size) throws I2CPMessageException, IOException {
  try {
    _sessionId = new SessionId();
    _sessionId.readBytes(in);
    _sessionConfig = new SessionConfig();
    _sessionConfig.readBytes(in);
  } catch (DataFormatException dfe) {
    throw new I2CPMessageException("Unable to load the message data", dfe);
  }
}
origin: i2p/i2p.i2p

SessionConfig cfg = new SessionConfig(session.getMyDestination());
Properties props = getRouterOptions(session);
if (tunnels > 0) {
origin: i2p/i2p.i2p

public DataStructure createDataStructure() throws DataFormatException {
  SessionConfig cfg = new SessionConfig((Destination)(new DestinationTest()).createDataStructure());
  cfg.setSignature((Signature)(new SignatureTest()).createDataStructure());
  Properties options = new Properties();
  options.setProperty("routerHost", "localhost");
  options.setProperty("routerPort", "54321");
  options.setProperty("routerSecret", "blah");
  cfg.setOptions(options);
  cfg.signSessionConfig((SigningPrivateKey)(new SigningPrivateKeyTest()).createDataStructure());
  return cfg; 
}
public DataStructure createStructureToRead() { return new SessionConfig(); }
origin: i2p/i2p.i2p

/** 
 * Send all the messages that a client needs to send to a router to establish
 * a new session.  
 */
public void connect(I2PSessionImpl session) throws I2PSessionException {
  updateBandwidth(session);
  CreateSessionMessage msg = new CreateSessionMessage();
  SessionConfig cfg = new SessionConfig(session.getMyDestination());
  cfg.setOptions(getRouterOptions(session));
  if (session.isOffline()) {
    cfg.setOfflineSignature(session.getOfflineExpiration(),
                session.getTransientSigningPublicKey(),
                session.getOfflineSignature());
  }
  try {
    cfg.signSessionConfig(session.getPrivateKey());
  } catch (DataFormatException dfe) {
    throw new I2PSessionException("Unable to sign the session config", dfe);
  }
  msg.setSessionConfig(cfg);
  session.sendMessage_unchecked(msg);
}
origin: i2p/i2p.i2p

SessionConfig cfg = new SessionConfig(dest);
cfg.setSignature(in.getSignature());
Properties props = new Properties();
net.i2p.data.i2cpSessionConfig<init>

Popular methods of SessionConfig

  • getDestination
    Retrieve the destination for which this session is supposed to connect
  • setOptions
    Configure the session with the given options; keys and values 255 bytes (not chars) max each Default
  • getCreationDate
    Determine when this session was authorized by the destination (so we can prevent replay attacks)
  • getOptions
    Retrieve any configuration options for the session
  • getSignature
  • setSignature
  • signSessionConfig
    Sign the structure using the supplied private key
  • tooOld
    Misnamed, could be too old or too far in the future.
  • getBytes
  • getOfflineExpiration
    Get the offline expiration
  • getOfflineSignature
  • getTransientSigningPublicKey
  • getOfflineSignature,
  • getTransientSigningPublicKey,
  • readBytes,
  • setOfflineSignature,
  • verifySignature,
  • writeBytes

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now