• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Posted read() hangs on socket disconnect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Posted read() hangs on socket disconnect


  • Subject: Posted read() hangs on socket disconnect
  • From: Jonathon Kuo <email@hidden>
  • Date: Wed, 27 May 2009 16:32:59 -0700

I have two processes communicating over the internet via TCP/IP sockets, a Linux sender and a Mac receiver. The receiving process uses a read() posted on a socket that reads small data packets in a loop. It works fine until the sender quits (disconnects/aborts). I was expecting the posted read() call to return with a status < 0, but it never returns, it just hangs forever. Is there some other way (C function, Mac network framework?) that will cover this exit case so that I can be notified when the sender drops out?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Posted read() hangs on socket disconnect
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Want to block HTTP(web) access but not filesharing
  • Next by Date: Re: Posted read() hangs on socket disconnect
  • Previous by thread: FW: copy some kernel extensions to /tmp directory and then load that kext when program Launches
  • Next by thread: Re: Posted read() hangs on socket disconnect
  • Index(es):
    • Date
    • Thread