From: Thadeu Lima de Souza Cascardo Date: Mon, 3 Nov 2008 10:46:47 +0000 (-0200) Subject: Add function to return TCP file descriptor X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fchat.git;a=commitdiff_plain;h=1737bf08fa42284aa1a1c388594267b3b92fb0ec Add function to return TCP file descriptor --- diff --git a/xmpp.c b/xmpp.c index 8e37c78..283c68a 100644 --- a/xmpp.c +++ b/xmpp.c @@ -113,6 +113,12 @@ hc_xmpp_server (hc_xmpp_t *xmpp) return xmpp->server; } +int +hc_xmpp_fd (hc_xmpp_t *xmpp) +{ + return xmpp->fd; +} + void hc_xmpp_send_buffer (hc_xmpp_t *xmpp, char *buffer, size_t len) { diff --git a/xmpp.h b/xmpp.h index f26cf73..b33ad25 100644 --- a/xmpp.h +++ b/xmpp.h @@ -52,6 +52,7 @@ int hc_xmpp_is_bind_supported (hc_xmpp_t *); int hc_xmpp_is_session_supported (hc_xmpp_t *); int hc_xmpp_is_session_required (hc_xmpp_t *); char *hc_xmpp_server (hc_xmpp_t *); +int hc_xmpp_fd (hc_xmpp_t *); void hc_xmpp_send_buffer (hc_xmpp_t *, char *, size_t); void hc_xmpp_send_iks (hc_xmpp_t *, iks *); void hc_xmpp_read_and_parse (hc_xmpp_t *);