• 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: kCFSocketDataCallBack auto accepts connection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kCFSocketDataCallBack auto accepts connection?


  • Subject: Re: kCFSocketDataCallBack auto accepts connection?
  • From: Quinn <email@hidden>
  • Date: Thu, 9 Oct 2008 09:49:02 +0100

At 3:27 +0800 9/10/08, Liwei wrote:
I read that kCFSocketDataCallBack and kCFSocketAcceptCallBack are
mutually exclusive callback types and that kCFSocketAcceptCallBack is
called when a connection is automatically accepted and data is read.

Does this imply that kCFSocketDataCallBack also automatically accepts
an incoming connection? If not, then how do I know of an incoming
connection? I'm using TCP in this case.

In general you use a CFSocket with kCFSocketAcceptCallBack to listen for and accept new incoming connections. You can then use either a CFStream (created with CFStreamCreatePairWithSocket) or a CFSocket (created with CFSocketCreateWithNative and with either kCFSocketDataCallBack or kCFSocketReadCallBack set) to manage each specific connection.


S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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: 
 >kCFSocketDataCallBack auto accepts connection? (From: Liwei <email@hidden>)

  • Prev by Date: Re: TCP Push function in CFStream?
  • Next by Date: Re: Question about adding search domains using kSCPropNetDNSSearchDomains
  • Previous by thread: kCFSocketDataCallBack auto accepts connection?
  • Next by thread: Problems with Security Update 2008-006
  • Index(es):
    • Date
    • Thread