BTLSockets Framework Version 1.1 Released
This weekend I finished up my work on the first publicly-released version of the BTLSockets framework. It can be downloaded at its Google Code page. The BTLSockets framework is a wrapper around the BSD sockets API for Objective-C. It currently supports TCP and UDP connection over IPv4 and IPv6, but can be extended to support other transport-layer protocols and address families.
There are many other socket frameworks for Objective-C, such as AsyncSocket, OmniNetworking and EDCommon, to name a few. Some of these sockets are more simple, and some of them sport features not implemented by BTLSocket. In general, it is probably best to use the simplest solution which will meet your needs, so BTLSocket might not be the best framework for your project. However, BTLSocket offers the following features:
- TCP and UDP support.
- IPv4 and IPv6 support.
- Extensibility to other protocols and address families.
- Socket handler objects.
- Portability to UNIX, UNIX-like and Windows systems.
Socket Handler Objects
The BTLSockets framework uses socket handler objects which sit between the socket and the application. These handlers can filter the data before it is read by the delegate or written to the network. This interface can be used, for example to implement encryption schemes (from simple XOR schemes to SSL) or to tokenize incoming network traffic. Socket handlers can be chained together in a list, passing data down the line until it reaches the last handler, and are portable across all applications using the BTLSockets framework.
Portability
The BTLSockets framework is implemented using classes from the Foundation framework. It should compile and run on UNIX, UNIX-like and Windows systems, using GNUStep or Cocotron, though it has not yet been tested on other systems. I hope to provide GNUStep makefiles and binaries for many systems in the future.