public DataStructure createDataStructure() throws DataFormatException { GetDateMessage msg = new GetDateMessage("0.8.13-0"); return msg; } public DataStructure createStructureToRead() { return new GetDateMessage(); }
/** * 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); } }
public DataStructure createStructureToRead() { return new GetDateMessage(); } }
auth.setProperty(PROP_USER, opts.getProperty(PROP_USER)); auth.setProperty(PROP_PW, opts.getProperty(PROP_PW)); sendMessage_unchecked(new GetDateMessage(CoreVersion.VERSION, auth)); } else { sendMessage_unchecked(new GetDateMessage(CoreVersion.VERSION));
auth.setProperty(PROP_PW, _options.getProperty(PROP_PW)); sendMessage_unchecked(new GetDateMessage(CoreVersion.VERSION, auth)); waitForDate();
return new SessionStatusMessage(); case GetDateMessage.MESSAGE_TYPE: return new GetDateMessage(); case SetDateMessage.MESSAGE_TYPE: return new SetDateMessage();