Article View: comp.os.os2.programmer.misc
Article #190Re: Sockets prog problems/questions; recv stays blocked when other end dies
From: Frankie Fan
Date: Tue, 04 Apr 1995 00:00
Date: Tue, 04 Apr 1995 00:00
28 lines
1975 bytes
1975 bytes
kbennett@cpcug.org (Keith Bennett) writes: >The following questions pertain to programming sockets using >IBM's TCP/IP for OS/2 version 2.0 (UN 64092). Our app is >running under OS/2 2.1 (not 2.11) and we hope to eventually >upgrade to Warp. >We have found that when doing a blocking read (recv()) on a >socket, the read will not return if the machine on the other end >of the socket has been switched off or rebooted. (Despite our (...) You need to set keepalive option by using setsockopt(). The default keepalive timer for IBM TCP/IP is 120 mins (Yes! It's 2 Hr). This is because it's ported from BSD NET/2 TCP/IP stack! However, since CSD UN56402, IBM add a new utility, call inetcfg.exe. You have to run it right after TCP/IP is initialized by giving following commands inetcfg keepalive=minute where "minute" is the new keepalive timer in minute, it's a value from 0 to 120. This will apply to all the tcp connection started afterward. I have been used for quite a while and it worked just fine. <---------------------------------------------------------------------------> Frankie Fan Internet: kfan@netcom.com Author of OS2HTTPD - WWW Server for OS/2 ftp://ftp.netcom.com/pub/kf/kfan/overview.html
Technical Details
Message-ID:
<kfanD6Hp49.2MG@netcom.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3lc25d$kt1@cpcug.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cd94,d2ec22b1757b70e6 X-Google-Attributes: gid10cd94,public X-Google-Thread: 11307a,d2ec22b1757b70e6 X-Google-Attributes: gid11307a,public X-Google-Thread: 106983,d2ec22b1757b70e6 X-Google-Attributes: gid106983,public From: kfan@netcom.com (Frankie Fan) Subject: Re: Sockets prog problems/questions; recv stays blocked when other end dies Date: 1995/04/04 Message-ID: <kfanD6Hp49.2MG@netcom.com> X-Deja-AN: 100805835 sender: kfan@netcom14.netcom.com references: <3lc25d$kt1@cpcug.org> organization: NETCOM On-line Communication Services (408 261-4700 guest) newsgroups: comp.os.os2.programmer.misc,comp.os.os2.networking.tcp-ip,bit.listserv.os2-l