Re: IPC with Sockets
Re: IPC with Sockets
- Subject: Re: IPC with Sockets
- From: Matt Jaffa <email@hidden>
- Date: Sat, 21 Feb 2004 14:30:53 -0700
Thanks for responding Justin,
I think I have it working now,
The KEXT disconnected from it before, but after 250 connections it
still started that mess,
but now In the daemon I have it creating a socket then accepting and
after it has done the communication, I close the the socket and it is
working fine now.
Matt
On Feb 21, 2004, at 1:51 PM, Justin Walker wrote:
On Saturday, February 21, 2004, at 07:18 AM, Matt Jaffa wrote:
Hi,
SO thanks to all those that have replied in the past and pointed me
towards
using Steven's book Vol. 2, that has helped a lot.
Another problem has come up that I can't find addressed in Steven's
book.
I have a daemon running forever accepting connections and then
receiving info and responding back to my KEXt all using the AF_UNIX
sockets,
This works great except when the daemon has received about 250
connections it starts throwing error 24 (EMFILE) too many files
open, I know that a process's limit of this can be increased, but I
would like a fix that doesn't require that,
I want it where after the connection was accepted by the daemon and
it receives and sends info, that it can close that connection, so as
to prevent this error.
Hmmm...it sounds as if you haven't completely figured out your
communication scheme.
First, if this is communication between one daemon and one KEXT, why
keep opening connections? Can't you reuse the same one?
Second, if it is important to have new connections, why can't one end
or the other close when done? The last guy to send can cloes his end;
and the last guy to receive can close the socket, at which point the
whole connection goes away.
Perhaps I don't understand enough of what you are trying to achieve.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Men are from Earth.
| Women are from Earth.
| Deal with it.
*--------------------------------------
*-------------------------------*
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.