• 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
dup() & sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: dup() & sockets
      • From: Quinn <email@hidden>
  • Prev by Date: Peeking at data on a socket (MSG_PEEK?)
  • Next by Date: Re: Locations disappear after creating dialup set with MoreSCF
  • Previous by thread: Re: Peeking at data on a socket (MSG_PEEK?)
  • Next by thread: Re: dup() & sockets
  • Index(es):
    • Date
    • Thread