From: Max Krasnyansky <maxk@qualcomm.com>
To: "Daryl Van Vorst" <daryl@wideray.com>,
"'Marcel Holtmann'" <marcel@rvs.uni-bielefeld.de>
Cc: "'BlueZ Mailing List'" <bluez-devel@lists.sourceforge.net>
Subject: RE: [Bluez-devel] Qualification - L2CA_DisconnectCfm
Date: Tue, 13 May 2003 11:00:18 -0700 [thread overview]
Message-ID: <5.1.0.14.2.20030513105017.0d234df0@unixmail.qualcomm.com> (raw)
In-Reply-To: <000d01c318e4$32a57460$1a01010a@baked>
At 05:11 PM 5/12/2003, Daryl Van Vorst wrote:
>Marcel,
>
>The behaviour you list below makes sense to me. I think there's supposed to
>be a 60 second timeout instead of 5 seconds, but that seems a bit excessive
>to me. Does it matter? If we close L2CAP and then the remote side sends an
>L2CAP_DISCONN_RSP, does the fact that we've already closed the channel cause
>any different packets to be exchanged?
No. If they don't send rsp within 5 second we simply kill this channel.
And if we receive rsp for already closed channel we ignore it.
>The only advantage that I see in the capability of a blocking close is
>completeness. I can't think of a scenario where it really matters, but you
>never know what someone will cook up.
>
>I don't believe the application actually needs to know that the
>disconnection was normal, just that it has definitely been disconnected. I'm
>a little fuzzy on the definition of "disconnected". Telling the app that
>there was a timeout is optional.
What we need is SO_LINGER option support. Application doesn't care so much about
the disconnect itself but it does care if all the data that it had written to a
socket has been sent.
i.e.
connect(sk);
send(sk, stuff, sizeof(stuff));
close(sk);
Some apps want close() to sleep until all data has been sent and connection was
successfully closed.
>If the stack closing the L2CAP connection and then receiving an
>L2CAP_DISCONN_RSP afterwards does not cause any different traffic to occurr
>(ie: the remote side can't tell the difference), then we're probably ok. Is
>this true?
Yes, remote side cannot tell whether a local app is sleeping on close() or not.
>Then the only difference between what we do and what the spec
>says is _when_ the "L2CA_DisconnectCfm" gets sent to the app. In our case,
>it would be immediately (i.e.: close() returned success). In the test case,
>it is 60 seconds after sending the disconnect request.
Yes. But SO_LINGER support is still useful for real life apps. I'll look in to it.
Max
next prev parent reply other threads:[~2003-05-13 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-10 0:04 [Bluez-devel] Qualification - L2CA_DisconnectCfm Daryl Van Vorst
2003-05-12 22:43 ` Daryl Van Vorst
2003-05-12 23:48 ` Marcel Holtmann
2003-05-13 0:11 ` Daryl Van Vorst
2003-05-13 18:00 ` Max Krasnyansky [this message]
2003-05-13 22:44 ` Marcel Holtmann
2003-05-13 23:11 ` Max Krasnyansky
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=5.1.0.14.2.20030513105017.0d234df0@unixmail.qualcomm.com \
--to=maxk@qualcomm.com \
--cc=bluez-devel@lists.sourceforge.net \
--cc=daryl@wideray.com \
--cc=marcel@rvs.uni-bielefeld.de \
/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