How to turn off SO_LINGER on TCP/IP socket on SCO 3.2v4.2

How to turn off SO_LINGER on TCP/IP socket on SCO 3.2v4.2

Post by Peter Wol » Thu, 05 May 1994 09:01:03



aAs any one had success turning OFF the TCP/IP option SO_LINGER?  My idea
of diabling it and then asking via getsockopt indicates that it is OFF,
however when I close the offending socket it hangs waiting for data to drain.

The relevant code snippet is:

struct linger   flush;

    flush.l_onoff = 0;
    flush.l_linger = 0;
    err = setsockopt(newfd, SOL_SOCKET, SO_LINGER, &flush, sizeof(flush));

Thanks for your help.
---

                        Telos Engineering Ltd.
--

                        Telos Engineering  Ltd.

 
 
 

How to turn off SO_LINGER on TCP/IP socket on SCO 3.2v4.2

Post by David E. Lindem » Fri, 06 May 1994 01:38:32


: aAs any one had success turning OFF the TCP/IP option SO_LINGER?  My idea
: of diabling it and then asking via getsockopt indicates that it is OFF,
: however when I close the offending socket it hangs waiting for data to drain.

: The relevant code snippet is:

: struct linger   flush;

:     flush.l_onoff = 0;
:     flush.l_linger = 0;
:     err = setsockopt(newfd, SOL_SOCKET, SO_LINGER, &flush, sizeof(flush));

: Thanks for your help.
: ---

:                       Telos Engineering Ltd.
: --

:                       Telos Engineering  Ltd.

        SO_LINGER doesn't do exactly what you want here.  The simplest way to
get an "instant" close is to use shutdown (2).  shutdown is pretty simple:
shutdown (socket, how) where 0 means disable further reads, 1 means disable
further sends, and 2 means disable both.  This causes a "half-close" operation
on the socket and will allow you to close it without blocking.  However, the
connection will go into FIN_WAIT until all outstanding packets are processed.
You can also use SO_LINGER to cause an abortive disconnect by setting l_onoff
to 1 and l_linger to 0.  This will cause a RESET to be sent immediately when
you issue a close.  The other side will then get a connection reset error
rather than a simple EOF indication.

get an "instant

 
 
 

1. SCO 3.2v4.2, TCP/IP 1.2.1

Where can I get fresh install disks for SCO 3.2v4.2 ?

I am also looking for TCP/IP 1.2.1 for SCO 3.2v4.1 .

Any information about where I could find these would be
appreciated.

Thanks,

Eaglet

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

2. Pinout for a serial-cabel for apc smart ups and powercute

3. SCO r3.2v4.2 TCP/IP?

4. AIX 4.3 (vmker, vmgetinfo) HELP !!

5. where to get TCP/IP for SCO Unix 3.2v4

6. host.allow, host.deny

7. SCO 3.2v4.2 / MS Mail integration over TCP/IP??

8. Auto insmod at boot

9. looking for tcp/ip socket library for 3.2v4.2

10. TCP/IP for SCO 3.2v4.2

11. TCP/IP for SCO 3.2v4.0n

12. TCP/IP for SCO 3.2v4.2

13. tcp/ip ppp hangup in sco 3242 tcp/ip 121