Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Help with L2CAP sockets
Date: Fri, 29 Apr 2005 11:39:25 +0200	[thread overview]
Message-ID: <1114767565.8836.37.camel@pegasus> (raw)
In-Reply-To: <4271D1F8.4000307@impulsesoft.com>

Hi Mayank,

>   I am developing an application using the L2CAP sockets provided by 
> BlueZ. I am creating a pool of sockets and listening to all of them 
> simultaneously. To avoid spawning of a thread for each socket, i tried 
> using the async capabilities of the socket. I set the FASYNC flag using 
> the ioctl to the socket, and set my pid to it. Thereafter i get a SIGIO 
> whenever data is available on any of the socket. Everything seems fine 
> except for disconnection. When an L2CAP socket is disconnected from the 
> remote device, i do not get any SIGIO. Hence i am not able to do get the 
> disconnection indication since i am not doing a read on the socket. I do 
> a read only when i receive a SIGIO.
>   I want to know if there is a way i can add code to the L2CAP file of 
> bluez to send a sigio whenever it receives a disconnection indication. 

I have no idea, but I never used FASYNC with BlueZ. Use select()/poll()
and write an event loop.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      parent reply	other threads:[~2005-04-29  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29  6:19 [Bluez-devel] Help with L2CAP sockets Mayank Sharma
2005-04-29  6:46 ` [Bluez-devel] 答复: " gao.yingbin
2005-04-29  9:39 ` Marcel Holtmann [this message]

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=1114767565.8836.37.camel@pegasus \
    --to=marcel@holtmann.org \
    --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