Protocol Independence
What's changed in this release:
- Updated to use the latest
swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a
drop of the Swift toolchain. Use of this drop or higher isREQUIRED
. - Changed library to be protocol independent. It now fully supports both IPV4 and IPV6 including listening on an IPV6 socket.
- Removed use of
gethostbyname()
since it's obsolete and replaced it with the more modern getaddrinfo(). - Added extensions for
sockaddr
,sockaddr_in
,sockaddr_in6
andsockaddr_storage
to facilitate conversions based on the protocol family. - Improved documentation adding missing where needed.
- Replaced the
BlueSocket.dottedIP(fromAddress:)
class method with a new more robustBlueSocket.ipAddressStringAndPort(fromAddress:)
that returns an optional tuple containing both the string representation of the hostname and the port based on the pass socket address info. - Added code to maintain signatures for all connected sockets. This can be accessed via the
signature
property. - Added new class function that allows creation of a connected socket using a
BlueSocketSignature
,BlueSocket.createConnected(Signature:)
. Accompanying that, added an instance function,connectUsing(Signature:)
, that allows connection to be achieved by providing aBlueSocketSignature
object. - Added convenient method for creating a
BlueSocketSignature
to make it easier to use the new class function to create a connected socket all in one step. - Added new class function that allows creation of a BlueSocket instance using an existing raw socket fd and address.