1
Network / Re: Non-blocking TCP connect cannot be completed
« on: June 06, 2019, 09:52:55 pm »
No I did not.
Note that the subsequent calls to connect() were testing to see if the socket (m_socket) is in the connected state, and returning 'Done' if it is.
I traced the call chain as ... TcpSocket::connect() -> TcpSocket::disconnect() -> Socket::close() which on return insures the socket handle (m_socket) is set to priv::SocketImpl::invalidSocket().
Thus, TcpSocket::connect(), always begins the establishment of a new connection on a newly created socket (via Socket::create()).
Note that the subsequent calls to connect() were testing to see if the socket (m_socket) is in the connected state, and returning 'Done' if it is.
I traced the call chain as ... TcpSocket::connect() -> TcpSocket::disconnect() -> Socket::close() which on return insures the socket handle (m_socket) is set to priv::SocketImpl::invalidSocket().
Thus, TcpSocket::connect(), always begins the establishment of a new connection on a newly created socket (via Socket::create()).