From: Mayank BATRA <mayank.batra@st.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] Reading data on two l2cap sockets
Date: Tue, 1 Aug 2006 16:41:05 +0530 [thread overview]
Message-ID: <000b01c6b55b$2ec2d650$9d0cc70a@dlh.st.com> (raw)
Hi,
I am listening on two l2cap sockets (on different PSMs) and then connecting to these two sockets.
I am using select() to get data on these two sockets.
fd_set readfds;
FD_ZERO(&readfds);
FD_SET(sk1, &readfds);
FD_SET(sk2, &readfds);
while(1) {
int ready = select(FD_SETSIZE, &readfds, 0, 0, 0);
if(ready == 0)
continue;
if(ready == -1 && errno != EINTR)
break;
if(FD_ISSET(sk1, &readfds)) {
fprintf(stderr, "Got something on sk1\n");
/* some code */
}
if(FD_ISSET(sk2, &readfds)) {
fprintf(stderr, "Got something on sk2\n");
/* some code */
}
}
Now, if I send data on sk1, the line "Got something on sk1" is printed, but if I send data on sk2, the line "Got something on sk2" is never printed.
Is there any contraint that both the l2cap sockets should be on the same PSM?
Regards,
Mayank
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2006-08-01 11:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 11:11 Mayank BATRA [this message]
2006-08-01 11:32 ` [Bluez-devel] Reading data on two l2cap sockets Filippo Giunchedi
2006-08-01 11:56 ` Mayank BATRA
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='000b01c6b55b$2ec2d650$9d0cc70a@dlh.st.com' \
--to=mayank.batra@st.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