static void Main(string[] args)
{
// create a new component connection to the given serverdomain, port and password
// a password is needed for the most servers for security reasons, if your server runs behind
// a firewall or a closed company network then you could allow component connections without password.
comp = new XmppComponentConnection("localhost", 5555, "secret");
// The Jid which this component will use
comp.ComponentJid = new Jid("test.gnauck.dyndns.org");
// Setup event handlers
comp.OnLogin += new ObjectHandler(comp_OnLogin);
comp.OnClose += new ObjectHandler(comp_OnClose);
comp.OnRoute += new agsXMPP.XmppComponentConnection.RouteHandler(comp_OnRoute);
comp.OnReadXml += new XmlHandler(comp_OnReadXml);
comp.OnWriteXml += new XmlHandler(comp_OnWriteXml);
comp.Open();
Console.ReadLine();
comp.Close();
Console.ReadLine();
Console.WriteLine("And open the Connection again");
comp.Open();
Console.ReadLine();
comp.Close();
Console.ReadLine();
}