Skip to content

Protocol Independence

Compare
Choose a tag to compare
@billabt billabt released this 06 Mar 16:27
· 656 commits to master since this release

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 is REQUIRED.
  • 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 and sockaddr_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 robust BlueSocket.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 a BlueSocketSignature 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.