Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #1733

Re: is SO_KEEPALIVE broken?

From Ian Zimmerman <itz@buug.org>
Newsgroups comp.os.linux.networking
Subject Re: is SO_KEEPALIVE broken?
References <506fbf0d$0$18685$91cee783@newsreader03.highway.telekom.at>
Date 2012-10-14 12:52 -0700
Message-ID <87fw5gsufz.fsf@foolinux.dyndns.org> (permalink)
Organization mail2news@dizum.com

Show all headers | View raw


The following message is a courtesy copy of an article
that has been posted to comp.os.linux.networking as well.


Johann> Hello, I have two programs, which communicate via a TCP
Johann> socket. one client which sends one-byte commands and a server
Johann> which interprets them. The server uses read() to get those
Johann> bytes.

Johann> The manual page for recv says:

>> The return value will be 0 when the peer has performed an orderly
>> shutdown.

Johann> (allegedly recv and read behave roughly the same)

Shouldn't both just block until there's something to read?  Or do you
turn on nonblocking mode?

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
http://www.gravatar.com/avatar/c66875cda51109f76c6312f4d4743d1e.png
Rule 420: All persons more than eight miles high to leave the court.

Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

is SO_KEEPALIVE broken? Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-10-06 07:18 +0200
  Re: is SO_KEEPALIVE broken? telsar <noone@nowhere.com> - 2012-10-06 13:59 -0500
    Re: is SO_KEEPALIVE broken? Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-10-07 00:12 +0200
      Re: is SO_KEEPALIVE broken? Richard Kettlewell <rjk@greenend.org.uk> - 2012-10-07 11:52 +0100
        Re: is SO_KEEPALIVE broken? Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-10-08 05:09 +0200
  Re: is SO_KEEPALIVE broken? Ian Zimmerman <itz@buug.org> - 2012-10-14 12:52 -0700
    Re: is SO_KEEPALIVE broken? Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-10-18 14:17 +0200

csiph-web