+
+ // Data saved from incoming SERVER command, for later use when our credentials have been accepted by the other party
+ std::string description;
+ std::string sid;
+ std::string name;
+ bool hidden;
+};
+
+/** Every SERVER connection inbound or outbound is represented by an object of
+ * type TreeSocket. During setup, the object can be found in Utils->timeoutlist;
+ * after setup, MyRoot will have been created as a child of Utils->TreeRoot
+ */
+class TreeSocket : public BufferedSocket
+{
+ SpanningTreeUtilities* Utils; /* Utility class */
+ std::string linkID; /* Description for this link */
+ ServerState LinkState; /* Link state */
+ CapabData* capab; /* Link setup data (held until burst is sent) */
+ TreeServer* MyRoot; /* The server we are talking to */
+ int proto_version; /* Remote protocol version */
+ bool ConnectionFailureShown; /* Set to true if a connection failure message was shown */
+
+ static const unsigned int FMODE_MAX_LENGTH = 350;
+
+ /** Checks if the given servername and sid are both free
+ */
+ bool CheckDuplicate(const std::string& servername, const std::string& sid);
+