Skip to content

Releases: Kitura/BlueSocket

Eliminate some compiler warnings

29 Sep 18:05
dd924c3
Compare
Choose a tag to compare
2.0.2

Fix warnings due to improper exclusion; update gitignore (#206)

Include update for cocoapods

28 Jun 22:40
68ec325
Compare
Choose a tag to compare
Updated podspec for 2.0.1 (#203)

* Updated podspec

* Update README for minimum toolchain versions

2.0.0

19 Jun 17:06
4dd6c81
Compare
Choose a tag to compare

This release no longer supports Swift 4.x. The minimum supported Swift version is 5.0, while the minimum recommended version is 5.2.

Version 1.0

23 Nov 16:13
Compare
Choose a tag to compare

Version 1.0

Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

Prerequisites

Swift

  • Swift Open Source swift-4.0.0-RELEASE toolchain (Minimum REQUIRED for latest release)
  • Swift Open Source swift-5.0-RELEASE toolchain (Recommended)
  • Swift toolchain included in Xcode Version 10.2 (10E125) or higher.

macOS

  • macOS 10.11.6 (El Capitan) or higher.
  • Xcode Version 9.0 (9A325) or higher using one of the above toolchains.
  • Xcode Version 10.2 (10E125) or higher using the included toolchain (Recommended).

iOS

  • iOS 10.0 or higher
  • Xcode Version 9.0 (9A325) or higher using one of the above toolchains.
  • Xcode Version 10.2 (10E125) or higher using the included toolchain (Recommended).

Linux

  • Ubuntu 16.04 (or 16.10 but only tested on 16.04 and 18.04).
  • One of the Swift Open Source toolchains listed above.

Other Platforms

  • BlueSocket is NOT supported on watchOS since POSIX/BSD/Darwin sockets are not supported on the actual device although they are supported in the simulator.
  • BlueSocket should work on tvOS but has NOT been tested.

Add-ins

  • BlueSSLService can be used to add SSL/TLS support.
    • If using this package, please note that the libssl-dev package is required to be installed when building on Linux.

Changes since 1.0.0

  • When calling getaddrinfo(), the hints variable should reflect the protocol family of the socket.
  • Added new parameter to connect() to allow the caller to force the connection to the specific family of the Socket instance making call. The default behavior is to allow connection to any socket family.
  • Big endian fixes. PR #130.
  • Update to Swift 4.1.
  • Fixed connect() for UDP sockets. PR #137.
  • Added CI support for Swift 4.2 builds. PR #138.
  • Improve using Signature to connect to socket. PR #147.
  • Update to use Swift 4.2 as default. PR #151.
  • Resolve Swift 5 compilation warnings. Drop Swift 3 support. PR #154.
  • Added new parameter to TCP version of listen API to allow caller to specify a particular address to listen on. This new parameter is defaulted to nil and therefore should NOT affect current callers.
  • Update the example in the README to correct a data race condition. Issue #115.
  • Update CI support to use Swift 4.2.3. PR #169
  • Update for Swift 5.0. PR #170.
  • Add CI support for Xcode 11.
  • Fixed problem with endianess on big iron. PR #177.
  • Update to use Swift 5.1 as default.

Version 1.0

27 Feb 14:42
Compare
Choose a tag to compare

Version 1.0

Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

Prerequisites

Swift

  • Swift Open Source swift-4.0.0-RELEASE toolchain (Minimum REQUIRED for latest release)
  • Swift Open Source swift-4.2-RELEASE toolchain (Recommended)
  • Swift toolchain included in Xcode Version 10.0 (10A255) or higher.

macOS

  • macOS 10.11.6 (El Capitan) or higher.
  • Xcode Version 9.0 (9A325) or higher using one of the above toolchains.
  • Xcode Version 10.0 (10A255) or higher using the included toolchain (Recommended).

iOS

  • iOS 10.0 or higher
  • Xcode Version 9.0 (9A325) or higher using one of the above toolchains.
  • Xcode Version 10.0 (10A255) or higher using the included toolchain (Recommended).

Linux

  • Ubuntu 16.04 (or 16.10 but only tested on 16.04).
  • One of the Swift Open Source toolchain listed above.

Other Platforms

  • BlueSocket is NOT supported on watchOS since POSIX/BSD/Darwin sockets are not supported on the actual device although they are supported in the simulator.
  • BlueSocket should work on tvOS but has NOT been tested.

Add-ins

Changes since 1.0.0

  • When calling getaddrinfo(), the hints variable should reflect the protocol family of the socket. See issue #128.
  • Added new parameter to connect() to allow the caller to force the connection to the specific family of the Socket instance making call. The default behavior is to allow connection to any socket family. See issues #129 and #128.
  • Added support for big endian devices. PR #130.
  • Added descriptive error messages for internal errors. PR #131.
  • Update for Swift 4.1.
  • Fixed minor warnings on Linux.
  • Fixed problem with connect() when using UDP sockets. PR #137.
  • Update to include Swift 4.2 in CI builds.
  • Added prerequisite that the libssl-dev package is required to be installed when building on Linux if using the BlueSSLService add-in.
  • Minor license update.
  • Performance fix for debug mode. PR #144.
  • Added test for issue #139.
  • connect using signature changes. PR #147.
  • Updates for Xcode 10 to project.
  • Swift 4.2 support.
  • Fixed buffer overflow problem that only showed up in optimized code. Issue #139.
  • Make Swift 4.2 the default compiler in project.
  • Update for Swift 4.2 (PR #151) and Xcode 10.
  • Added CI support for building with Swift 5. PR #154.
  • Added new parameter to TCP version of listen API to allow caller to specify a particular address to listen on. This new parameter is defaulted to nil and therefore should affect current callers.

Swift 4 Support.

29 Nov 15:51
Compare
Choose a tag to compare

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.

Update to latest Xcode (Beta 6) and toolchain (8/15).

16 Aug 03:26
Compare
Choose a tag to compare

This release requires use of the swift-DEVELOPMENT-SNAPSHOT-2016-08-15-a toolchain.

  • Compatible with Xcode 8 Beta 6 using the above toolchain.
  • 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.
  • IMPORTANT NOTE Testing requires a working Dispatch module in the toolchain. See the README.md for more information.
  • 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.
  • 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 instructions for building and installing Dispatch into the 8/15 Linux toolchain.

New APIs, new platform support, new test suite, new (8/7) toolchain.

10 Aug 20:16
Compare
Choose a tag to compare

This release requires use of the swift-DEVELOPMENT-SNAPSHOT-2016-08-04-a toolchain or the new swift-DEVELOPMENT-SNAPSHOT-2016-08-07-a toolchain. The use of the 8/7 toolchain is recommended.

  • 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.
  • IMPORTANT NOTE Testing requires a working Dispatch module in the toolchain. See the README.md for more information.
  • 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.
  • NSData and NSMutable data will be deprecated in a future release.
  • Removed verifyConnection() function from SSLServiceDelegate protocol. Now handled internally by SSLService itself.
  • See README.md for more information about the new API.
  • Works with Xcode 8 Beta 4 using the above toolchain.
  • Updated example in README.md to use multi-threaded Dispatch based API.
  • Added instructions for building and installing Dispatch into the 8/4 or 8/7 Linux toolchain.

New APIs, new platform support, new test suite.

26 Jul 15:42
Compare
Choose a tag to compare

This release requires use of the new swift-DEVELOPMENT-SNAPSHOT-2016-07-25-a toolchain.

  • Added support for arm architecture for FD utilities.
  • Added beginnings of a test suite.
  • 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.
  • Added write(from data: Data) - This function writes the data contained within the Data object to the socket.
  • See README.md for more information about the new API.
  • Works with Xcode 8 Beta 4 Default Toolchain.

Updates for the swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a toolchain

06 Jul 16:00
Compare
Choose a tag to compare

This release requires use of the new swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a toolchain.

  • Changes in response to Issue #6. Socket.wait() now supports a timed wait based on a passed timer value, an immediate return (i.e. quick check) and an indefinite wait.
  • Changed SOCKET_DEFAULT_MAX_CONNECTIONS to SOCKET_DEFAULT_MAX_BACKLOG and changed the default from 5 to 50.
  • Added SOCKET_MAX_DARWIN_BACKLOG for macOS.
  • Changed the signature of listen(on port: Int, maxPendingConnections: Int) to listen(on port: Int, maxBacklogSize: Int = Socket.SOCKET_DEFAULT_MAX_BACKLOG) and removed the listen(on port: Int) API since the same can be accomplished using defaults.
  • Updated documentation in README.md to reflect changes.