From: "theresa g." <tereza99@hotmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] rctest.c : question about do_listen function
Date: Mon, 29 Nov 2004 11:00:30 -0800 [thread overview]
Message-ID: <BAY102-F33BFE2838AD565BE5C0FE1D2BD0@phx.gbl> (raw)
hello everyone,
I have looked at the rctest.c file (inside the bluez-utils-2.11/test
directory) to get insight on how to write my own server app. It all makes
sense, except for the listen() call inside the do_listen function, which
follows:
if( listen(s, 10) ) {
syslog(LOG_ERR,"Can not listen on the socket. %s(%d)", strerror(errno),
errno);
exit(1);
}
I'm somewhat of a newbie to all this stuff (including sockets) so I question
why the listen return is being checked for a 1 for error when the man pages
say -1 is returned on error and 0 is returned on success.
Insight to this would really be appreciated!
Thanks in advance,
Theresa
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2004-11-29 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-29 19:00 theresa g. [this message]
2004-11-29 19:10 ` [Bluez-devel] rctest.c : question about do_listen function Lars Grunewaldt
2004-11-30 0:46 ` theresa g.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY102-F33BFE2838AD565BE5C0FE1D2BD0@phx.gbl \
--to=tereza99@hotmail.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox