PC Review


Reply
Thread Tools Rate Thread

Terminate Connection on closesocket

 
 
sucheta.phatak@gmail.com
Guest
Posts: n/a
 
      3rd Aug 2006
Hi all,

I am creating few nonblocking sockets using socket and ioctlsocket
function. Then using the setsockopt function I am enabling SO_LINGER
and specifying the timeout as 0.

Now after I call closesocket the function returns immediately, but the
connections are reset. This can be confirmed using netstat. I dont want
this to happen. I want the connection to be terminated immediately
after I call closesocket().

How can i achieve this? Is there any other way to terminate the
connections immediately? WINSOCk help says "If SO_LINGER is enabled
with a zero time-out: it always returns immediately -connection is
reset/terminated. " I guess in my case it is getting reset. How can I
set that to terminate?

To clear up things , My knowledge about reset and terminate is as
follows

When i say connection is reset : tht means a RST packet is send to the
destination.
Terminate : NO more packets are sent on this connection but it is
immediately closed.
Is this terminology correct?

Waiting for reply.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception on System.Net.OSSOCK.closesocket() pedrito Microsoft C# .NET 2 21st Aug 2007 12:22 AM
closesocket call never returns =?Utf-8?B?R3VydQ==?= Microsoft VC .NET 0 11th Jan 2005 07:01 AM
Outlook chooses to terminate connection(broadband) to internet fo. =?Utf-8?B?ZGViaW5kZWVk?= Microsoft Outlook Discussion 0 1st Oct 2004 11:07 AM
shutdown, recv, and closesocket on local connections David Brownell Microsoft Windows 2000 Networking 0 5th May 2004 11:13 PM
OT? Terminate internet dial-up connection Andy Windows XP Internet Explorer 0 11th Sep 2003 09:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:54 AM.