I must amend my previous review now that I have made extensive use of AsyncSocket. I still recommend this class to anyone who is implementing sockets on a small scale, but if you're going to be dealing with large amounts of data and many simultaneous connections this class will not be adequate. There are major performance problems.
Over the past few months I have been writing an OS X HTTP proxy server. Initially I planned on writing the socket functionality with SmallSockets, my old favorite, but the synchronous nature of SmallSockets was going to be a problem. So I wrote my connection classes using AsyncSocket, and I was thrilled with the simplicity and the incredibly clean and intuitive design of this class. When I started stress-testing my proxy server, however, it would sustain 40-50% CPU utilization when downloading large files over my cable connection. I ended up re-writing the program using SmallSockets and implementing threads manually to make it asynchronous. Now the CPU utilization never spikes above 2-3%. I wrestled with AsyncSocket for a long time trying to see if I could get the CPU utilization down, but I think it's a factor of the single-threaded, notifications-based architecture of this class.
In conclusion, this does have the nicest interface of all the OS X socket classes. OmniNetworking is big and confusing. I haven't tried NetSocket so I don't know about that one. SmallSockets is the leanest and meanest, but you have to get a bit more low-level with it. If you're implementing sockets on a small scale, this is probably still your best and easiest choice.
AsyncSocket
Cocoa socket class
Version: 4.3
Excellent design, but there are performance issues
Feedback Type: Review
Contributed by: tyrayner Friday, November 19 2004 @ 11:09 AM PST
Product Platform: MacOSX
Used Product For: 1-6 months
Recommend Product: YES
Overall Rating:
Ease of Use:
Support:
Features:
Quality / Stability:
Price:
Excellent design, but there are performance issues - Eric_Redlinger_808
Ran into those same performance issues with large files in our app, dropcopy. But you gotta love this class - it is a joy to work with if your networking needs are more modest.Reply to This
Saturday, October 01 2005 @ 05:12 PM PDT