Martin Angers
|
52a1d88d4e
|
remove need to force-unwrap path
|
2017-06-21 14:34:47 -04:00 |
|
Martin Angers
|
776c421c06
|
replace strncpy with UnsafeMutableBufferPointer
|
2017-06-21 14:33:15 -04:00 |
|
Yossi Mesika
|
74b5335331
|
Added missing parameter description and build only on linux
|
2017-06-09 06:55:23 +03:00 |
|
Yossi Mesika
|
1418e63280
|
Merge remote-tracking branch 'IBM-Swift/master'
|
2017-05-23 16:27:47 +03:00 |
|
Yossi Mesika
|
659cfee17c
|
Changed indentation from spaces to tabs as used throughout the code
|
2017-05-23 16:15:59 +03:00 |
|
Yossi Mesika
|
091eb32e02
|
Updated SSLServiceDelegate with a function and field to support ALPN and HTTP/2
|
2017-05-22 21:16:39 +03:00 |
|
Bill Abt
|
3c06c5a5bb
|
During a read operation with truncate equal to true, the memcpy statement was incorrect, causing a buffer overflow. This commit corrects that problem.
|
2017-05-19 09:18:33 -04:00 |
|
Quan Vo
|
a8f5d40ef8
|
Cast mask to Int32
|
2017-05-12 16:24:29 -05:00 |
|
Bouke Haarsma
|
e639a3fd5e
|
Set SO_REUSEPORT for port sharing on OSX
|
2017-03-30 22:15:07 +02:00 |
|
Bill Abt
|
0986c40a4d
|
Port check range for connect should've been 1-65535 not 1024-65535..
|
2017-03-27 12:53:28 -04:00 |
|
Bill Abt
|
c9ff50a4fa
|
Validate the port values passed to connect(to:port:) function and ensure they fall within the proper range.
|
2017-03-27 12:44:34 -04:00 |
|
Bill Abt
|
6033ce5bae
|
Reduce the default SSL read buffer size.
|
2017-03-24 16:06:51 -04:00 |
|
Bill Abt
|
b7e428d75f
|
When the SSLServiceDelegate is set to a non-nil value, increase the read buffer size to accommodate the TLS packet size.
|
2017-03-24 10:49:51 -04:00 |
|
Bouke Haarsma
|
8fb7478210
|
Allow port sharing between ipv4 and ipv6
|
2017-03-24 07:51:42 +01:00 |
|
Bill Abt
|
fa1c82d8ae
|
Minor comment fix.
|
2017-03-23 17:47:25 -04:00 |
|
Bill Abt
|
755d03812e
|
Added two new functions that allow the setting of a read and write timeout respectively.
|
2017-03-16 11:52:47 -04:00 |
|
Shaun Merchant
|
22e3d4c3b8
|
Fix memory leak
|
2017-03-01 10:36:42 +00:00 |
|
Sebastian Kreutzberger
|
49750c644a
|
Fix warnings under Swift 3.1
Swift is now a bit stricter in terms of output of optional strings and
chaining of types which are not 100% the same (like Int32 vs Int).
|
2017-02-20 16:52:49 +01:00 |
|
Bill Abt
|
7c7ac6a14b
|
Removed print statement from the didset section of readBufferSize. Changed how the flags are reset during a close to fix a problem in the MongoKitten driver.
|
2017-02-04 21:56:37 -05:00 |
|
Bill Abt
|
0ca58bd33a
|
Minor changes to correct some error messages that were inaccurate due to cut/paste errors.
|
2017-01-26 19:38:22 -05:00 |
|
Bill Abt
|
aa2caea69e
|
Removed check for remoteConnectionClosed. The check is not needed. The socket is still open under these circumstances and normal error handling should suffice.
|
2017-01-25 22:12:31 -05:00 |
|
Bill Abt
|
6f8e1c5ba0
|
If we've indicated that the remote side of the connection is closed, prohibit subsequent reads and writes to the socket.
|
2017-01-25 20:31:45 -05:00 |
|
Bill Abt
|
b789a1d5f9
|
Change send function signature of the SSLServiceDelegate protocol to not specify an explicitly unwrapped UnsafeRawPointer. Not needed.
|
2017-01-25 20:31:13 -05:00 |
|
Bill Abt
|
7e995b297e
|
Revert "If we've indicated that the remote connection is closed, prohibit subsequent reads and writes to the socket."
This reverts commit 33b7afd41a.
|
2017-01-25 12:04:54 -05:00 |
|
Bill Abt
|
33b7afd41a
|
If we've indicated that the remote connection is closed, prohibit subsequent reads and writes to the socket.
|
2017-01-25 11:52:45 -05:00 |
|
Bill Abt
|
511aed8e25
|
Fix for issue #49. The path to the UNIX socket should not be deleted on close unless it's the socket that created it in the first place, the one that's listening.
|
2017-01-22 10:51:04 -05:00 |
|
Bill Abt
|
6101df2df7
|
Merge pull request #48 from djones6/sigpipe
Always set MSG_NOSIGNAL to avoid process exit due to SIGPIPE
|
2017-01-17 10:18:04 -05:00 |
|
David Jones
|
127da486e9
|
Convert spaces to tabs to match rest of source
|
2017-01-17 11:01:41 +00:00 |
|
David Jones
|
20235281c5
|
Always set SO_NOSIGPIPE on sockets on Mac
|
2017-01-17 10:53:47 +00:00 |
|
Bill Abt
|
5a7a76d84a
|
When reusing a socket (i.e.: calling conneect(to:port:)), don't call the SSLService deinitialize() delegate function.
|
2017-01-16 11:40:15 -05:00 |
|
David Jones
|
bbb00bdef9
|
Always set MSG_NOSIGNAL to avoid process exit due to SIGPIPE
|
2017-01-16 11:58:41 +00:00 |
|
Bill Abt
|
6f2573ec9f
|
Added 3 missing checks for socket validation prior to function access.
|
2017-01-12 09:48:32 -05:00 |
|
Bill Abt
|
b31b8d5f2f
|
Fix for Kitura issue #959: https://github.com/IBM-Swift/Kitura/issues/959. Need to call SSLServiceDelegate method BEFORE closing the Socket as part of the close() method, not the deinit(). In SSLService, commented out the cleanup of OpenSSL error strings and EVP due to issues discovered in the latest OpenSSL version.
|
2017-01-10 12:32:11 -05:00 |
|
Bill Abt
|
0d75429b10
|
Fix for issue #46: socket path corrupt.
|
2017-01-03 13:20:28 -05:00 |
|
Bill Abt
|
a8a99376d3
|
Minor name changes for conistency.
|
2016-12-09 15:48:03 -05:00 |
|
Bill Abt
|
acf026175b
|
Added comments related to PR42 to additional lines of code where the same thing will occur.
|
2016-12-09 15:16:19 -05:00 |
|
Carl Brown
|
cd92bf21cc
|
Comment only change
This might save people some time.
|
2016-12-09 13:39:54 -06:00 |
|
Bill Abt
|
55d46ecfa7
|
Minor improvements to eliminate some forced unwraps of optionals.
|
2016-12-08 11:36:11 -05:00 |
|
Bill Abt
|
0087fe96c5
|
Some final UDP cleanup including removal of the truncate parameter from the readDatagram API. Changed the signature of the Signature initializer to include the protocol family, so that you can create both IPv4 and IPv6 signatures. Added additional comments and documentation to the tests.
|
2016-12-08 10:45:55 -05:00 |
|
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 |
|