* Resolved dependency on SwiftArgumentParser
- Moved BlueSocketTestClient and BlueSocketTestServer to Examples folder
with it's own Package.swift file
* Update minimum swift argument parser to 1.1.3
* Update podspec; Update travis build platforms.
* travis: update CI environments
* Add BlueSocketTestCommonLibrary, BlueSocketTestClient, BlueSocketTestServer
- Add a library component to make it easier to do tests and profiling under streaming loads (multiple client connections, lots of data, etc.)
* Removed Swift 4.x, bumped minimum swift version requirement to 5.1
* keep build at Swift 5.0; update CI to only test from 5.1.5 on up
* Only attempt to build command-line for Swift 5.2+
* Ensure tools and dependencies only build for Swift 5.2+
* Address various lint errors
* Update README with version details and latest iOS related issues
Also allow creating a Signature with Address and hostname
In this case the hostname is only used for SSL verification as the address is already resolved
fd_set is defined as 16 64-bit integers in a 64-bit linux machine. Since this package accesses fd_set per 32 bits, endianess needs to be taken aware to calculate the index.
I've added two pieces here: first is a `defer` block right after the creation of the `socketDescriptor` variable. If it's non-nil and not `Socket.SOCKET_INVALID_DESCRIPTOR` then the socket is closed pronto. Secondly, I'm explicitly setting this variable to `nil` when it's copied into `self.socketfd`. From that point on, any failure or error thrown will not result in the socket being orphaned, since it's referenced by the `Socket` class instance, and will be cleaned up in its `deinit` implementation.
- Now uses an unsigned type to perform the bit-shift operation and then casts to signed type using `init(bitPattern:)`.
- Added a unit test case which ensures fd values from zero to (arbitrarily) 128 can all be inserted and removed from the fd_set.
- `fd_set` API is now much nicer and will compile about as close to the C implementation as we can get— especially on release builds, with compiler inlining.
- Socket structure's `readBuffer` now initializes all its bytes to zero, not just the first.
- More idiomatic/concise return expression in `Socket.wait(for:timeout:waitForever:)` (don't build an output array manually, we have `filter(_:)` for that).
- Various non-Linux code to set the `SO_NOSIGPIPE` option has been tucked into a private function now, still containing the compilation conditional. It's a no-op on Linux, and will be inlined by the compiler (since it's private) and the calling code looks much more straightforward.
- BUGFIX: calls to `gai_strerror(_:)` take the result of the `getaddrinfo()` call as a parameter, NOT `errno`.
asAddr funcs were passing unsafe pointers outside of the callbacks in which try should be used
Using callback to make all the access within these callbacks
Fixes bug where IPv6 address was 'cast' to sockaddr but actually was zero'd beyond the length of sockaddr_in and packets written to the wrong address