site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On 15 Sep 2018, at 08:53, Haohao Lee <hayatelee@gmail.com> wrote:
If I call `sock_getsockname` in `sf_connect_out_func`, an empty address will be returned.
Yeah, I suspect that might be the case. One option is to defer your call to `sock_getsockname` until you get the first data in or out. I’d expect it to be set up by that. However, that introduces its own problems, in that you can no longer block a connection. Rather, the program will see the connection go through and then, if you decide to block it, immediately disconnect. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com