diff options
author | james <> | 2008-02-14 00:57:58 +0000 |
---|---|---|
committer | james <> | 2008-02-14 00:57:58 +0000 |
commit | ccc64e79a870d37ddff7afa92a41fd9a8dbecd42 (patch) | |
tree | 0bdb47259ef1654c9d2707a1d698770b7012effe /apps/client.c | |
parent | 9813b15b4b9d07fac6c20ab13194c446fd119ee6 (diff) | |
download | sympathy-ccc64e79a870d37ddff7afa92a41fd9a8dbecd42.tar.gz sympathy-ccc64e79a870d37ddff7afa92a41fd9a8dbecd42.tar.bz2 sympathy-ccc64e79a870d37ddff7afa92a41fd9a8dbecd42.zip |
*** empty log message ***
Diffstat (limited to 'apps/client.c')
-rw-r--r-- | apps/client.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/apps/client.c b/apps/client.c index e1b650e..54f4c33 100644 --- a/apps/client.c +++ b/apps/client.c @@ -10,8 +10,58 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.2 2008/02/14 00:57:58 james + * *** empty log message *** + * * Revision 1.1 2008/02/13 18:05:06 james * *** empty log message *** * */ +#include <sympathy.h> +#include "client.h" + +static void client_msg(s) +{ + printf ("%p [%d] %s\n", s->msg, s->msg->hdr.size , s->msg->debug.msg ); + + + +} +void +client (void) +{ + Socket *s; + fd_set rfds, wfds; + + s = socket_connect ("socket"); + + + if (!s) + { + printf ("no socket"); + return; + } + + for (;;) + { + struct timeval tv = { 0, 100000 }; + + + FD_ZERO (&rfds); + FD_ZERO (&wfds); + + socket_pre_select (s, &rfds, &wfds); + + select (FD_SETSIZE, &rfds, &wfds, NULL, &tv); + + socket_post_select (s, &rfds, &wfds); + + while (s->msg) + { + client_msg(s); + socket_consume_msg (s); + } + } + +} |