Add support for IPv4 to TCPSocket#40
Add support for IPv4 to TCPSocket#40kdubb wants to merge 1 commit intoenvoy:masterfrom reTXT:ipv4_socket
Conversation
| var serverReceivedData: [String] = [] | ||
|
|
||
| let clientSocket = try! TCPSocket() | ||
| let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
|
|
||
| let port = try! getUnusedTCPPort() | ||
| let listenSocket = try! TCPSocket() | ||
| let listenSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| try! listenSocket.listen() | ||
|
|
||
| let clientSocket = try! TCPSocket() | ||
| let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
|
|
||
| let port = try! getUnusedTCPPort() | ||
| let listenSocket = try! TCPSocket() | ||
| let listenSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| var serverReceivedData: [String] = [] | ||
|
|
||
| let clientSocket = try! TCPSocket() | ||
| let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| func testGetPeerName6() { | ||
| let port = try! getUnusedTCPPort() | ||
| let listenSocket = try! TCPSocket(blocking: true) | ||
| let listenSocket = try! TCPSocket(family: .v6, blocking: true) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| } | ||
|
|
||
| let clientSocket = try! TCPSocket(blocking: true) | ||
| let clientSocket = try! TCPSocket(family: .v6, blocking: true) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| func testReadAndWrite6() { | ||
| let port = try! getUnusedTCPPort() | ||
| let listenSocket = try! TCPSocket(blocking: true) | ||
| let listenSocket = try! TCPSocket(family: .v6, blocking: true) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| exp0.fulfill() | ||
| } | ||
|
|
||
| let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
| let exp0 = expectation(description: "socket accepcted") | ||
| var acceptedSocket: TCPSocket! | ||
| queue.async { | ||
| acceptedSocket = try! listenSocket.accept() |
There was a problem hiding this comment.
Force Try Violation: Force tries should be avoided. (force_try)
No description provided.