• 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: Carbon -> Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carbon -> Cocoa


  • Subject: Re: Carbon -> Cocoa
  • From: Alastair Houghton <email@hidden>
  • Date: Tue, 21 Aug 2018 16:33:47 +0100

On 21 Aug 2018, at 10:09, Mike Crawford <email@hidden> wrote:
>
>> drag C developers away from the POSIX sockets API
>
> Don't be dismayed if you're not happy with NIO:
>
> There are numerous APIs that do such dragging, for example the
> ADAPTIVE Communications Environment (ACE):
>
>   http://www.dre.vanderbilt.edu/~schmidt/ACE.html
> <http://www.dre.vanderbilt.edu/~schmidt/ACE.html>
>
> Mozilla's NetScape Portable Runtime, The Electric Magic Company's
> ZooLib is C++ and MIT Licensed:
>
>   http://www.em.net/portfolio/2000/12/zoolib.html
> <http://www.em.net/portfolio/2000/12/zoolib.html>
>
> I expect there are many others.

One of the problems with many of those libraries is that they tend to insist
that your software use their own event loop implementation(s). Admittedly it’s
been a while since I looked at ACE (for example), but NIO is at least going to
be using the same mechanisms that you’d use anyway in a macOS or iOS
application.

Anyway, when looking at an async networking library, you want to check that it
will integrate nicely with the set of platforms you care about, using the kind
of event dispatch you require in your application. So, for instance, it’s not
so good on macOS or iOS if its event dispatcher is based on select(), (e)poll()
or kqueue() because what you really want on macOS/iOS is for the event dispatch
to go via CFRunLoop; if it doesn’t, you’ll end up having to use threading to
run the network library’s event loops on background threads, which for an async
networking library kind of defeats the point IMO. (Of course, you may want to
have event loops running in threads or thread pools for performance reasons,
but one of the real benefits of async networking libraries is that you can use
them from the main thread in your GUI code.)

Likewise, on Windows you’re going to want something that uses
MsgWaitForMultipleObjectsEx() or similar, and on Linux you definitely want
epoll() support.

Kind regards,

Alastair.

--
http://alastairs-place.net

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Carbon -> Cocoa
      • From: Jens Alfke <email@hidden>
References: 
 >Carbon -> Cocoa (From: Casey McDermott <email@hidden>)
 >Re: Carbon -> Cocoa (From: Sean McBride <email@hidden>)
 >Re: Carbon -> Cocoa (From: Stephane Sudre <email@hidden>)
 >Re: Carbon -> Cocoa (From: Jens Alfke <email@hidden>)
 >Re: Carbon -> Cocoa (From: Jean-Daniel <email@hidden>)
 >Re: Carbon -> Cocoa (From: Mike Crawford <email@hidden>)

  • Prev by Date: Re: is there a way to determine if an NSButton is toggleable ?
  • Next by Date: Re: Carbon -> Cocoa
  • Previous by thread: Re: Carbon -> Cocoa
  • Next by thread: Re: Carbon -> Cocoa
  • Index(es):
    • Date
    • Thread