• 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: Bad things happening to listener CFSockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad things happening to listener CFSockets


  • Subject: Re: Bad things happening to listener CFSockets
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 23 May 2002 10:23:44 -0700

On Thursday, May 23, 2002, at 09:22 AM, Avi Drissman wrote:

I'm working on porting my code to CFSockets and CFStreams. In my current code, I'm using OT, and in the code to handle the listening socket, I deal with events like T_LISTEN (of course), but also with T_DISCONNECT and T_ORDREL. How do I get notification that something happened to my socket via the CFSocket API? (The only mechanism would be a callback, but the header says my callback will only be called for incoming connections.)

CFSocket is based on BSD sockets, which don't map exactly to OT concepts. What happens is that when a connection is accepted, a new socket is created for it, and this new socket then represents that connection. This is a BSD socket; you can deal with it using the BSD APIs, you can create a CFSocket for it, or you can create a CFStream pair for it--most likely the latter, with CFStreamCreatePairWithSocket(). If the connection is broken, the CFStream would then tell you about it.

Perhaps someone on the list with more OT experience can map this more directly into OT terms for you.

Douglas Davidson
_______________________________________________
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: Bad things happening to listener CFSockets
      • From: Avi Drissman <email@hidden>
References: 
 >Bad things happening to listener CFSockets (From: Avi Drissman <email@hidden>)

  • Prev by Date: Re: CFStream bugs? (was Re: CFNetwork Website)
  • Next by Date: Re: Bad things happening to listener CFSockets
  • Previous by thread: Bad things happening to listener CFSockets
  • Next by thread: Re: Bad things happening to listener CFSockets
  • Index(es):
    • Date
    • Thread