Terminate Connection on closesocket

Discussion in 'Windows Networking' started by sucheta.phatak@gmail.com, Aug 3, 2006.

  1. Guest

    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.
     
    , Aug 3, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJT

    Re: Slow LAN connection

    CJT, Jul 4, 2003, in forum: Windows Networking
    Replies:
    2
    Views:
    5,851
    Bob Hatcher
    Jul 11, 2003
  2. Newcomsas

    WinXP to Win98 connection problem

    Newcomsas, Jul 9, 2003, in forum: Windows Networking
    Replies:
    2
    Views:
    659
    tek4andy
    Sep 12, 2005
  3. Lee Sanders

    ??Unknown Connection Sharing??

    Lee Sanders, Jul 11, 2003, in forum: Windows Networking
    Replies:
    0
    Views:
    645
    Lee Sanders
    Jul 11, 2003
  4. Shane Curveon

    Internet Connection Sharing.

    Shane Curveon, Jul 15, 2003, in forum: Windows Networking
    Replies:
    2
    Views:
    581
    Shane Curveon
    Jul 16, 2003
  5. David Gerard

    Can't find wireless connection in Windows

    David Gerard, Jul 16, 2003, in forum: Windows Networking
    Replies:
    0
    Views:
    493
    David Gerard
    Jul 16, 2003
Loading...

Share This Page