2 * © 2008 INA Service GmbH
4 package net.pterodactylus.util.fcp;
8 * A “ClientHello” message that <i>must</i> be sent to the node first thing
9 * after calling {@link FcpConnection#connect()}.
11 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
14 public class ClientHello extends FcpMessage {
17 * Creates a new “ClientHello” message with the given client name. The
18 * client name has to be unique to the node otherwise you will get a
19 * {@link CloseConnectionDuplicateClientName} response from the node!
22 * The unique client name
24 public ClientHello(String clientName) {
25 this(clientName, "2.0");
29 * Creates a new “ClientHello” message with the given client name. The
30 * client name has to be unique to the node otherwise you will get a
31 * {@link CloseConnectionDuplicateClientName} response from the node!
33 * The expected FCP version is currently ignored by the node.
36 * The unique client name
37 * @param expectedVersion
38 * The FCP version that the node is expected to talk
40 public ClientHello(String clientName, String expectedVersion) {
42 setField("Name", clientName);
43 setField("ExpectedVersion", expectedVersion);