Esempio n. 1
0
 public object Clone()
 {
     ServerNode node = new ServerNode();
     node.ip = ip;
     return node;
 }
Esempio n. 2
0
		 private static ArrayList createServers(string l)
		 {
			Global.Tokenizer tok = new Global.Tokenizer(l, ",");
			string t;
			Address addr;
			int port;
			ArrayList retval = new ArrayList();
			Hashtable hosts = new Hashtable();
			ServerNode node;
	//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
			int j = 0;
			while (tok.HasMoreTokens())
			{
				try
				{
					t = tok.NextToken();
	//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
					string host = t.Substring(0, (t.IndexOf((char) '[')) - (0));
					host = host.Trim();
					port = Convert.ToInt32(t.Substring(t.IndexOf((char) '[') + 1, (t.IndexOf((char) ']')) - (t.IndexOf((char) '[') + 1)));
					node = new ServerNode(host);
					

					retval.Add(node);
	//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
					j++;

				}
                catch (FormatException ex)
				{
                    throw ex;
				}
				catch (Exception ex)
				{
                    throw ex;
				}
			}

			return retval;

		 }