-
Notifications
You must be signed in to change notification settings - Fork 74
Add support for IPv4 to TCPSocket #40
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
try! listenSocket.bind(port: port) | ||
try! listenSocket.listen() | ||
|
||
var clientReceivedData: [String] = [] | ||
var serverReceivedData: [String] = [] | ||
|
||
let clientSocket = try! TCPSocket() | ||
let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
@@ -243,14 +243,14 @@ class TransportTests: XCTestCase { | |||
let loop = try! SelectorEventLoop(selector: try! TestingSelector()) | |||
|
|||
let port = try! getUnusedTCPPort() | |||
let listenSocket = try! TCPSocket() | |||
let listenSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
try! listenSocket.bind(port: port) | ||
try! listenSocket.listen() | ||
|
||
let clientSocket = try! TCPSocket() | ||
let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
@@ -179,11 +179,11 @@ class TransportTests: XCTestCase { | |||
let loop = try! SelectorEventLoop(selector: try! TestingSelector()) | |||
|
|||
let port = try! getUnusedTCPPort() | |||
let listenSocket = try! TCPSocket() | |||
let listenSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
try! listenSocket.bind(port: port) | ||
try! listenSocket.listen() | ||
|
||
var clientReceivedData: [String] = [] | ||
var serverReceivedData: [String] = [] | ||
|
||
let clientSocket = try! TCPSocket() | ||
let clientSocket = try! TCPSocket(family: .v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
@@ -61,7 +168,7 @@ class TCPSocketTests: XCTestCase { | |||
exp0.fulfill() | |||
} | |||
|
|||
let clientSocket = try! TCPSocket(blocking: true) | |||
let clientSocket = try! TCPSocket(family: .v6, blocking: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force Try Violation: Force tries should be avoided. (force_try)
No description provided.