#include <stdlib.h>
#include "xmpp.h"
#include "xmpp_internal.h"
+#include "iksemel_extra.h"
hc_xmpp_t *
-hc_xmpp_new (void)
+hc_xmpp_new (iksStreamHook *hook, char *server)
{
hc_xmpp_t *xmpp = malloc (sizeof (hc_xmpp_t));
+ xmpp->server = strdup (server);
+ xmpp->parser = iks_extra_stream_new (xmpp, hook);
+ xmpp->fd = hc_tcp_connect (server, "xmpp-client");
xmpp->tls = NONE;
xmpp->sasl = NONE;
return xmpp;