linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to RESET the client connection socket?
@ 2004-04-21 13:16 Srinivas Chinta
  2004-04-21 13:32 ` Jan-Benedict Glaw
  0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Chinta @ 2004-04-21 13:16 UTC (permalink / raw)
  To: linux-c-programming

Hi,

I have a server, and some clients connected to it. How
do i RESET a client connection socket ? Are there any
APIs to do this? or any socket options available?

Any help on this regard is greatly appreciated.

Thanks,

Srini




	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to RESET the client connection socket?
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2004-04-21 13:32 UTC (permalink / raw)
  To: linux-c-programming

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

On Wed, 2004-04-21 06:16:53 -0700, Srinivas Chinta <chintasrinivas_tech@yahoo.com>
wrote in message <20040421131653.73513.qmail@web21208.mail.yahoo.com>:

> I have a server, and some clients connected to it. How
> do i RESET a client connection socket ? Are there any

IIRC you can do that with shutdown(2).

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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to RESET the client connection socket?
  2004-04-21 13:32 ` Jan-Benedict Glaw
@ 2004-04-22  9:17   ` Srinivas Chinta
  2004-04-22 10:24     ` Jan-Benedict Glaw
  0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Chinta @ 2004-04-22  9:17 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: linux-c-programming

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?

Thanks,
Srini

--- Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Wed, 2004-04-21 06:16:53 -0700, Srinivas Chinta
> <chintasrinivas_tech@yahoo.com>
> wrote in message
>
<20040421131653.73513.qmail@web21208.mail.yahoo.com>:
> 
> > I have a server, and some clients connected to it.
> How
> > do i RESET a client connection socket ? Are there
> any
> 
> IIRC you can do that with shutdown(2).
> 
> 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 part 2 application/pgp-signature
name=signature.asc




	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to RESET the client connection socket?
  2004-04-22  9:17   ` Srinivas Chinta
@ 2004-04-22 10:24     ` Jan-Benedict Glaw
  0 siblings, 0 replies; 4+ messages in thread
From: Jan-Benedict Glaw @ 2004-04-22 10:24 UTC (permalink / raw)
  To: linux-c-programming

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-22 10:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).