• 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
Re: Does sendmsg only work on AF_UNIX sockets?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does sendmsg only work on AF_UNIX sockets?


  • Subject: Re: Does sendmsg only work on AF_UNIX sockets?
  • From: Dave Camp <email@hidden>
  • Date: Thu, 13 Nov 2008 16:44:53 -0800

On Nov 13, 2008, at 3:47 PM, Josh Graessley wrote:

Without speculating on whether or not it's against the rules...I don't know if it's possible or not but if you can register a mach port, you should be able to look it up from the other process. Even better, if your file fits entirely in memory (possibly a stretch) and you send it via a mach message, mach will automatically do some memory map magic for you.

If you can't use mach, you can use a TCP socket by connecting through the loopback address. If you're reading the data off the flash to send over, whether you're using an AF_UNIX socket or an AF_INET socket connected via loopback, you may end up limited by the read speed of the flash and not the throughput of the sockets. If you are actually limited by the throughput of sending data through the socket, sendfile may give you some performance gain by eliminating one copy.

Calling sendfile on the device drops me into gdb in the middle of the call. Hitting continue allows perror to report "function not implemented".


I guess I'll try mach ports next. Maybe avoiding the TCP overhead (assuming there is much) will yield the speed I need. Unfortunately, the maximum sampling rate with Instruments (1/10th of second on the phone) makes it difficult to tell much in terms of consistent I/O rates for flash or the network.

Thanks for all the pointers!

Dave

_______________________________________________
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


References: 
 >Does sendmsg only work on AF_UNIX sockets? (From: Dave Camp <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: "Justin C. Walker" <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: Quinn <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: Dave Camp <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: james woodyatt <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: Dave Camp <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: Josh Graessley <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: Dave Camp <email@hidden>)
 >Re: Does sendmsg only work on AF_UNIX sockets? (From: Josh Graessley <email@hidden>)

  • Prev by Date: Re: SOAP request faultcode 65794 (stream error)
  • Next by Date: Re: Get network paarmeters
  • Previous by thread: Re: Does sendmsg only work on AF_UNIX sockets?
  • Next by thread: Re: Does sendmsg only work on AF_UNIX sockets?
  • Index(es):
    • Date
    • Thread