public DataStructure createDataStructure() throws DataFormatException { SetDateMessage msg = new SetDateMessage("0.8.13-0"); return msg; } public DataStructure createStructureToRead() { return new SetDateMessage(); }
public DataStructure createStructureToRead() { return new SetDateMessage(); } }
public void timeReached() { if (!_isStarted) return; for (ClientConnectionRunner runner : _runners.values()) { if (runner instanceof QueuedClientConnectionRunner) continue; if (runner.isDead()) continue; SessionConfig cfg = runner.getPrimaryConfig(); if (cfg == null) continue; // simple session or no session yet if (runner.getLeaseSet(cfg.getDestination().calculateHash()) == null) continue; // don't confuse client while waiting for CreateLeaseSet msg try { // only send version if the client can handle it (0.8.7 or greater) runner.doSend(new SetDateMessage(runner.getClientVersion() != null ? CoreVersion.VERSION : null)); } catch (I2CPMessageException ime) {} } if (_isStarted) schedule(LOOP_TIME); } }
/** * Defaults in GetDateMessage options are NOT honored. * Defaults are not serialized out-of-JVM, and the router does not recognize defaults in-JVM. * Client side must promote defaults to the primary map. */ private void handleGetDate(GetDateMessage message) { // sent by clients >= 0.8.7 String clientVersion = message.getVersion(); if (clientVersion != null) _runner.setClientVersion(clientVersion); Properties props = message.getOptions(); if (!checkAuth(props)) return; try { // only send version if the client can handle it (0.8.7 or greater) _runner.doSend(new SetDateMessage(clientVersion != null ? CoreVersion.VERSION : null)); } catch (I2CPMessageException ime) { if (_log.shouldLog(Log.ERROR)) _log.error("Error writing out the setDate message", ime); } }
return new GetDateMessage(); case SetDateMessage.MESSAGE_TYPE: return new SetDateMessage(); case DestLookupMessage.MESSAGE_TYPE: return new DestLookupMessage();