Skip to content

Swift 4 Support.

Compare
Choose a tag to compare
@billabt billabt released this 29 Nov 15:51
· 156 commits to master since this release

This release minimally requires use of the swift-3.1.1-RELEASE toolchain or the swift-4.0.0-RELEASE toolchain which is recommended.

  • Compatible with Xcode 9.0 (9A235) General Release or higher using one of the above toolchains.
  • Added support for arm architecture for FD utilities.
  • Added nine (9) new tests to test suite including a full test server helper function that uses Dispatch.
  • Added read(into data: inout Data) - This function reads all the data available on a socket and returns it in the Data object that was passed. This function has been added to the SocketReader protocol.
  • Added write(from data: Data) - This function writes the data contained within the Data object to the socket. This method has been added to the SocketWriter protocol.
  • Merged in support for non-blocking writes to TCP sockets per PR#15 submitted against the legacy-0.7 branch. Also available at tag 0.7.6 for use with the 7/25 toolchain.
  • See README.md for more information about the new API.
  • Added new property, remoteConnectionClosed, to enable differentiation between a socket that is no longer connected to its' remote partner and one that would block. If this property returns true, the remote connection has been closed and the socket should be closed.
  • APIs based on NSData and NSMutable data will be deprecated in a future release.
  • Removed verifyConnection() function from SSLServiceDelegate protocol. Now handled internally by SSLService itself.
  • Minor change to initialize delegate function of SSLServiceDelegate. SSLService.inititalize(isServer:) became SSLService.initialize(asServer:).
  • Updated example in README.md to use multi-threaded Dispatch based API.
  • Added continuous integration (PR#16) include build badge in README.md.
  • Allow use on iOS, tvOS and watchOS as well as macOS.
  • Added endianness check for host before byte swapping (PR#20).
  • Added fix for issue #22. When requesting to listen on port 0, the port assigned by the OS was not being returned in the Signature. Hence, the caller would not know what port was assigned and is being listened to. Added two additional unit tests to test this condition. Also, related to this, passing of a zero (0) for port when attempting to connect is invalid and will now be cause for an exception being thrown.
  • Added support for using UNIX Domain Sockets. See the README.md for more information.
  • Read and write function can now throw a SOCKET_ERR_CONNECTION_RESET exception in the event the connection was reset by the peer.
  • Added new computed property, isSecure, at the Socket level to resolve the optional signature property and returns true if the socket is secure and false otherwise.
  • Updated tests to account for serverHelper launch and take down.
  • Added UDP support. See the README.md for more information.
  • Fixed issue #46.
  • Fixed issue #959 from Kitura.
  • Fixed a crash bug revealed in BlueSSLService issue #10.
  • Fixed issue #49. File representing a UNIX socket should not be deleted when a client socket is closed. Only the listening socket should delete the file.
  • Fixed issue #50.
  • Added documentation (as a result of issue #53) that documents how to set the socket read buffer size.
  • Changed how certain flags were being reset during the close of a socket. Related to issue #53. Also removed old debug statement and redundant memory clearing calls.
  • Merged PR #54 to correct warnings under Swift 3.1.
  • Merged PR #55 to correct memory leaks related to getAddrInfo.
  • In response to issue #56, added two new functions that allow the setting of a read and/or write timeout. See the README.md for more information.
  • Merged PR #57 to add CocoaPod support.
  • Added usage information for CocoaPods.
  • Merged PR #60 which now allows port sharing between IPV6 and IPV4 sockets.
  • When the SSLServiceDelegate is set to a non-nil value, increase the read buffer size to accommodate the TLS packet size. Related to issue #22 in BlueSSLService.
  • Added code to validate the port values passed to connect(to:port:) function and ensure they fall within the proper range.
  • Merged PR #61: Set SO_REUSEPORT for port sharing on macOS.
  • Merged PR #62.
  • Corrected buffer overflow problem when doing certain TCP reads the use the truncate parameter. See issue #66.
  • Changed podpsec Swift version to 3.1.1.
  • Update podspec to include watchOS and tvOS. PR #70
  • Support of Xcode 9 Beta.
  • Support for ALPN in SSLServiceDelegate. PR #67
  • Merge PR #72 to fix problem reported by issue #68.
  • Fixed issue #81, If the attempt to set the SO_REUSEPORT socket option fails, check errno for ENOPROTOOPT and if set, silently ignore the error. This can happen when using WSL (Windows Subsystem for Linux).
  • Added new utility function, udpBroadcast, to allow enablement and disablement of broadcast mode for UDP sockets. This fixes issue #80.
  • Fixed bug in new utility function, udpBroadcast, that was causing the inverse of what it was supposed to do.
  • Added enhancement to connect API to allow for a connection timeout (issue #65). See the documentation in the README.md for how to use the new API.
  • Swift 4 Support.
  • Merged PR #85 to allow deferral of SSL accept. This fixes BlueSSLService issue #40. For more details and discussion refer to that issue.
  • Fixed bug related to PR #85.
  • Removed watchOS support. See issue #87 for more info.
  • Fixed problem on macOS when using connect API. See issue #88 for more info.
  • Update FD* functions to consistently used Int32 where appropriate.
  • Allow wait() function to be called on UDP sockets that are bound.
  • Add new parameter for listen() API that allows the caller to decide whether to reuse the listening port or not. Default behavior is to reuse the port. Resolves issue #94.
  • Removed unsafe access to Socket.Address, PR #93.
  • Corrected some outdated documentation in README.md, issue #96.
  • Added tvOS target to Xcode project, issue #100.
  • Minor project changes for tvOS.
  • Remove build on Xcode 8.3.
  • CI updates.
  • Clarify use of the isReadableOrWritable() function when attempting to write to a newly connected socket. Issue #105.
  • Cleanup and minor bug fix. PR #107.
  • Rolled back fd_set extension from PR #107 to fix crash bug. Added additional tests to ensure this kind of crash bug doesn't get through again.
  • Added back the now fixed fd_set extension. PR #111.
  • The connect(to:port:timeout:) API will now throw an exception if called on a non-blocking socket without the optional timeout being passed with a value greater than zero. Updated documentation to reflect this.
  • Changes to adapt to Swift 4.1. Encompasses PR #121 and other related changes.
  • Fixed a bit-addressing error in fd_set implementation. Make sure that the temporary socket opened in Socket.connect(to:port:timeout:) is closed in the event of an error being thrown. See PR #126 for more information. This fixes the following issues: #120, #123 and #125.