dup() & sockets
dup() & sockets
- Subject: dup() & sockets
- From: "Duane Murphy" <email@hidden>
- Date: Sun, 10 Aug 2003 12:29:19 -0700
I havent found any information about this so I thought I would ask the
experts here.
Our application use a raw ethernet socket for device communication. The
socket is opened using MoreAuthSample.
If I need more than one socket, for example one per ethernet port, can I
dup() the one returned from the authenticated process and use it separately?
Here is why I think this could work:
1. Acquire the socket using the authenticated process
2. dup() the socket to a new fd
3. bind() the new socket to an ethernet port
4. repeat dup() and bind() for each ethernet port
Because bind is a separate step from acquiring the socket it seems like
this might work. However, I imagine that I have to go back to the well
for additional sockets.
Thanks for clarifying this idea,
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.