Hello guys.
Is there any way to find out if async socket _proc connect()_ has established a
connection or not - it just returns Future[void] either way - or a proper way
to handle refused connections?
My program crashes when I call
await socket.recvLine()
Run
for a socket where
asyncCheck socket.connect(serverAddress, port.Port)
Run
did not established a connection i.e. random IP, but it **works** ok when I
connect to my server which listens.
I've tried to catch an Exception and OSError (shown in traceback) but it didn't
work. Shown errors:
Error: unhandled exception: A request to send or receive data was
disallowed because the socket is not connected and (when sending on a datagram
socket using a sendto call) no address was supplied.
Exception message: A request to send or receive data was disallowed because
the socket is not connected and (when sending on a datagram socket using a
sendto call) no address was supplied.
Exception type: [OSError]
Run