Commit Graph
112 Commits
Author SHA1 Message Date
Frederick Kellison-Linn 9d3e7d4a93 Fix merge conflicts 2016-12-07 17:42:56 -05:00
Bill Abt 528386de13 Fixed function signature for Socket.createAddress. 2016-12-07 17:16:13 -05:00
Bill Abt 6cf4ac1fc2 Cherry-picked some changes from otherwise rejected PR37. Improved some internal documentation. 2016-12-07 17:03:41 -05:00
Frederick Kellison-Linn a7e12b47be Add Linux workaround 2016-12-07 16:14:17 -05:00
Frederick Kellison-Linn f3d9511fb8 Fix issue with Linux build 2016-12-07 14:54:53 -05:00
Frederick Kellison-Linn 6e617b3e69 Add ability to truncate TCP responses 2016-12-07 14:51:15 -05:00
Frederick Kellison-Linn 9b2212968a Add option to trucnate UDP messages (default true)
Add documentation

Add tests

QUIT UDP server when test finishes
2016-12-07 12:02:20 -05:00
Bill Abt 9adddc5f87 Move the convenience function to create an Address given a host and port to the Socket class level as a utility function and renamed it createAddress. Made the necessary changes to the test suite and turned on ALL UDP tests. 2016-12-06 16:46:16 -05:00
Frederick Kellison-Linn d2e3e489c6 Add UDP tests 2016-12-06 15:38:48 -05:00
Bill Abt 32270f4812 Turn on UDP support. 2016-12-06 13:30:35 -05:00
Bill Abt b052368c9f Final code for UDP support. Still not enabled yet pending testing and documentation. 2016-12-06 12:03:51 -05:00
Frederick Kellison-Linn 40aa623f92 Update UDP write stubs and correct typos
Update UDP write stubs and correct typos
2016-12-06 01:25:25 -05:00
Bill Abt 0f7fb43923 Ensure proper socket type and protocol combinations. 2016-12-05 18:38:36 -05:00
Bill Abt 42a17655f9 Changes to the signature of the read UDP functions. 2016-12-05 16:40:39 -05:00
Bill Abt d62e6df702 More UDP infrastructure changes. Added (disabled at this time) initial UDP tests. 2016-12-05 16:04:07 -05:00
Bill Abt 99b1929853 Minor changes to UDP stub functions. 2016-12-05 15:10:33 -05:00
Bill Abt b2dd8fdc66 Added more UDP infrastructure. 2016-12-05 15:07:42 -05:00
Bill Abt 33ead17cb6 Updated infrastructure for UDP support. Changed function signatures of some stub UDP functions. 2016-12-05 10:48:04 -05:00
Frederick Kellison-Linn e29c995bfd Move private method to proper location 2016-12-04 22:25:13 -05:00
Bill Abt 78752613a2 Added new computed property, isSecure, to Socket. This resolves the optional Signature property and returns whether or not the socket is secured. 2016-11-30 12:36:54 -05:00
Bill Abt 199f40b499 Connection reset by peer can happen on a write to a socket as well as a read. 2016-11-29 10:49:12 -05:00
Bill Abt 8c5adb1ef6 Added UNIX domain socket support. Added additional tests to cover the new support. Added new error code, SOCKET_ERR_CONNECTION_RESET, to indicate that socket read failed due the connection being reset by the peer. 2016-11-29 10:17:47 -05:00
Bill Abt 209c581f5c Update documentation. Also added timeout parameter to isReadableOrWritable function. 2016-11-16 14:41:51 -05:00
Bill Abt cd34b6ed76 Handle SSL requested retry attempts for read and write functions. 2016-11-16 12:00:03 -05:00
Bill Abt 49c5af8b69 Minor (Quick Look) documentation improvements. 2016-10-26 10:30:02 -04:00
Bill Abt f12fb3a7a2 Remove in-code disablement of swiftlint warnings, now done in the .swiftlint.yml file at the root of the repo. 2016-10-25 14:45:39 -04:00
Bill Abt c38f5dd6ac Disable "questionable" swiftlint items. 2016-10-25 13:30:44 -04:00
Bill Abt 3f5544b49a Related to issue #22, while the listen function can be called with a port of zero (0) and the OS will assign a free port, attempts to connect to port zero (0) are invalid and should fail. Now they do. 2016-10-12 13:09:13 -04:00
Bill Abt 9008d21b09 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 unit tests to test this condition. 2016-10-12 11:36:54 -04:00
Bill Abt 6c0ef004d9 Update to the latest (10/7) toolchain. 2016-10-10 10:51:58 -04:00
Bill Abt 54c55956da Changed property isLittleEndian from a variable to a let constant. It'll never change. Update to #PR20. 2016-10-04 11:13:39 -04:00
Chun Chen Hsu 92c4111d8f Fix endian bug in hostnameAndPort function
The hostnameAndPort() function forgets to check endian-ness of host
before returning port number.
2016-10-03 04:34:20 -04:00
Bill Abt 18dcee6ea2 Minor change for clarity. 2016-09-27 09:29:19 -04:00
Bill Abt 210d541b01 Documentation update and fixes. 2016-09-27 09:03:20 -04:00
Bill Abt c5aca4ac1f Allow use on iOS, tvOS and watchOS as well as macOS. 2016-09-26 11:24:04 -04:00
Bill Abt dce1b9f335 Bug fix: remoteConnectionClosed should only be set in the readDataIntoStorage() function since that's the only place where we can actually tell that it actually happened. 2016-09-15 09:22:33 -04:00
Bill Abt af73b59e7d 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. 2016-09-13 13:06:43 -04:00
Bill Abt 1cc72f4f13 Listening socket was not being flagged as secure when it should've been. 2016-09-07 14:55:11 -04:00
Bill Abt e23d093e49 Update to latest toolchain (8/18). 2016-08-18 23:09:50 -04:00
Bill Abt 9f7465b3ed Minor change to initialize delegate function of SSLServiceDelegate. SSLService.inititalize(isServer:) became SSLService.initialize(asServer:). 2016-08-16 19:29:09 -04:00
Bill Abt b8f118a460 Update to latest Xcode (Beta 6) and toolchain (8/15). 2016-08-15 23:17:20 -04:00
Bill Abt aa0058681c Merged in support for non-blocking writes to TCP sockets per PR#15 against the legacy-0.7 branch. Thanks Shmuel. 2016-08-11 11:56:50 -04:00
Bill Abt e731be1cc4 Fixed a problem with assigning a new SSLService delegate in newly accepted sockets. Thanks Tim!!!. 2016-08-09 14:38:17 -04:00
Bill Abt 03834f9f33 Fixed merge error: Re-added Data based method for SocketReader and SocketWriter. 2016-08-09 09:16:31 -04:00
Bill Abt 7eca50c933 Fixed merge error. 2016-08-06 11:17:16 -04:00
Bill Abt b545b5f2ab Minor edit to remove conflict marker. 2016-08-05 21:20:03 -04:00
Bill Abt b2c6cff009 Merged master-next to master based on the 8/4 toolchain. 2016-08-05 21:18:23 -04:00
Bill Abt d1d9ea58fa Update to latest (8/4) toolchain. 2016-08-05 21:05:40 -04:00
Bill Abt 51e8f2cd8c Merged PR#13 into master-next and modified code to conform to the 7/29 toolchain. 2016-08-02 13:15:48 -04:00
Bill Abt 7b64a42215 Updates to documentation and project. Minor edits to PR to fix indentation. 2016-08-02 10:28:14 -04:00