Re: Does sendmsg only work on AF_UNIX sockets?
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