From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: How to RESET the client connection socket?
Date: Thu, 22 Apr 2004 12:24:16 +0200 [thread overview]
Message-ID: <20040422102416.GQ12700@lug-owl.de> (raw)
In-Reply-To: <20040422091722.78999.qmail@web21208.mail.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
On Thu, 2004-04-22 02:17:22 -0700, Srinivas Chinta <chintasrinivas_tech@yahoo.com>
wrote in message <20040422091722.78999.qmail@web21208.mail.yahoo.com>:
> Thanks a lot for clearing my problem.
> By the way, is shutdown(2) something similar to
> setting socket linger options ?
> And, this shutdown(2) send any RESET error something
> back to client? or, client will be able to know that
> the server has RESET the connection?
Just try it:) You don't even need to modify your code for that. Simply
start your application within a debugger and call the shutdown function
by hand. While doing so, run a tcpdump to see what's happening.
And for the SO_LINGER option, right, there's some interaction with
close() and shutdown(). See socket(7).
Oh, for in-depth exploration of socket programming, see if you can
afford W. Richard Steven's books (_Unix Network Programming Vol1+Vol2_
for the practical part, _TCP/IP Illustrated Vol1/2/3_ for the theory).
They're really worth the money.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2004-04-22 10:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-21 13:16 How to RESET the client connection socket? Srinivas Chinta
2004-04-21 13:32 ` Jan-Benedict Glaw
2004-04-22 9:17 ` Srinivas Chinta
2004-04-22 10:24 ` Jan-Benedict Glaw [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=20040422102416.GQ12700@lug-owl.de \
--to=jbglaw@lug-owl.de \
--cc=linux-c-programming@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).