[gnet-dev] am i wrong? gnet_io_channel_readline
- From: richard_III gmx net
- To: gnet-dev lists gnetlibrary org
- Subject: [gnet-dev] am i wrong? gnet_io_channel_readline
- Date: Mon, 12 Jul 2004 10:34:03 +0200 (MEST)
i'd like to write a server using gnet. the server does read what the client
types by using gnet_io_channel_readline or gnet_io_channel_readline_strdup.
both of those methodes are working. the problem is, the cpu usage is to
much. if i have 0 clients connected the useage is correctly by 0% for this
process. if i have 1 client connected the useg increases up to 50% for the
2nd client up to 99%.
the following code runs in a thread-methode.
\/
guint bytes_read;
gchar* rbuffer;
while (true)
{
bytes_read = 0;
gnet_io_channel_readline_strdup (m_pCh,&rbuffer,&bytes_read);
}
/\
any idea what i did wrong?
thanks
richard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]