Re: Issuing connect(2) after select(2) on non-blocking socket
site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2NQpLR6RGVI+MTCko8/KULVGCmkd5uENmLIshQPMx8o=; b=geuFleCc+QZPcKCifQqRdWdQkej7CMcA5iN8y8+w8AtRBfcJ/v3UyOPyk50totr+FU zQOPr5ckebuvuBBEjMKy/KqZwkZpVJ0RHrtUavkbg1nsMjHMGPdIMRU8FczMJ0/lTYFX oHi7STogo97s/uZIzkTgqHmQiH8JAkeF7XcPQI4Lo+y78I6O6r4XSH4sce4zd1EP2t34 FiYsyW4gfY3/Q8lU1cSOUSf4B6xbVrLwoEK4gHEV7APqkANzLXRATL2qt9GmsQio2BhE /u5sTS8Yl6QAoLPQorvTllxox/W9aoXWL2k97reW+uUFWv4Ky1sHo/o08xBJkTCkeo3z nVFQ==
After the connect() returns EINPROGRESS, and after the select() indicates 1 descriptor ready for write, getsockopt() returns status=0, errno=0:
status = getsockopt(sockfd,SOL_SOCKET,SO_ERROR,&error,&len);
getsockopt() returns 0 on successful retrieval of the option value. So that's good. The option value is stored in memory pointed to by the fourth parameter (named 'error', above). Hence the variable error == ECONNREFUSED. Dado _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dado Colussi