• 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
Socket crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Socket crash


  • Subject: Socket crash
  • From: Philippe Robin <email@hidden>
  • Date: Sat, 6 Dec 2003 18:00:12 +0000

Hello,

I am blocked in my developments by the following problem :

I am using the SmallSocket class, I create a listening socket, accept the connection, send some data,
but when the other end of the socket closes the connection and I am still sending some data, my app crashes with this message :
Application has exited due to signal 13 (SIGPIPE).

This happens in the SmallSocket code at this line :
sent = send(socketfd, bytes, len, 0);

How do I detect the other en is closed?
How do I trap/avoid this error?

Note that the opening was done in a different thread to avoid blocking of the interface.

Any help most welcome ;-)

Philippe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Socket crash
      • From: Ed Watkeys <email@hidden>
    • Re: Socket crash
      • From: Ed Watkeys <email@hidden>
  • Prev by Date: Re: HelpViewer.app and Preview.app Toolbar Nav?
  • Next by Date: Re: Can't get window to come to front in awakeFromNib method
  • Previous by thread: Re: Can't get window to come to front in awakeFromNib method
  • Next by thread: Re: Socket crash
  • Index(es):
    • Date
    • Thread