Closed kkebo closed 2 years ago
P.S. I was running the server by this way.
nc -l 127.0.0.1 8620
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: Socket is already connected
I get the same error. As a workaround I'm catching the exception and ignoring it.
do {
try await socket.fileDescriptor.connect(to: address, sleep: 1_000_000_000)
} catch Errno.socketIsConnected {}
Firstly, thank you for this interesting project.
I'm attempting to create a TCP client using
Socket
.I already tried the following code:
but it didn't work and threw the following error:
Does anyone know any good example for this use case? Thanks.