2 * © 2008 INA Service GmbH
4 package net.pterodactylus.util.fcp.message;
6 import net.pterodactylus.util.fcp.FcpConnection;
7 import net.pterodactylus.util.fcp.FcpMessage;
10 * A “ClientHello” message that <i>must</i> be sent to the node first thing
11 * after calling {@link FcpConnection#connect()}.
13 * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
16 public class ClientHello extends FcpMessage {
19 * Creates a new “ClientHello” message with the given client name. The
20 * client name has to be unique to the node otherwise you will get a
21 * {@link CloseConnectionDuplicateClientName} response from the node!
24 * The unique client name
26 public ClientHello(String clientName) {
27 this(clientName, "2.0");
31 * Creates a new “ClientHello” message with the given client name. The
32 * client name has to be unique to the node otherwise you will get a
33 * {@link CloseConnectionDuplicateClientName} response from the node!
35 * The expected FCP version is currently ignored by the node.
38 * The unique client name
39 * @param expectedVersion
40 * The FCP version that the node is expected to talk
42 public ClientHello(String clientName, String expectedVersion) {
44 setField("Name", clientName);
45 setField("ExpectedVersion", expectedVersion);