Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95105 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92897 invoked from network); 12 Aug 2016 22:05:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2016 22:05:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=dave@mudsite.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dave@mudsite.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mudsite.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.217.173 mail-ua0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:33633] helo=mail-ua0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/64-55605-7184EA75 for ; Fri, 12 Aug 2016 18:05:12 -0400 Received: by mail-ua0-f173.google.com with SMTP id 74so62799607uau.0 for ; Fri, 12 Aug 2016 15:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mudsite-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=a4cO00Tfxao7FjIGfDzm/fW9I3b6qYyscu+y9JcrrBY=; b=caIi1dTNJNAK+vD5pB8MVtrSloHonWg9/I7gk+G+ztS48XHsXYj3FVc65NH1BVamKO exZjL1ANwTC4HYXSL3/KAwZdEsFgwGECu2XpM/SMSlwOy8bKPnr6u514aUSoZtxFiPxn xlRANiv2ot7j0slsQiklXA0R2IkHnjaQ/LRBkM5IccIc33NbgFOyiT19p34mgo4otYjX hCAtGOeGkc/LyaohD9APRyDRXQ7+GX2OGgblXLXE3iSHl8GnlqOlkApG+akSlEs0AVuw 5HwmxJLgrIj+EunkrLzXU9Zay1+xXuamzkJ4i7jMkFAHdWMR2C1Fl7d5t+wZGUCrfVOr Sa+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=a4cO00Tfxao7FjIGfDzm/fW9I3b6qYyscu+y9JcrrBY=; b=MuCXWTMekCMR7gPvS7Xqa55yyfFNF0zNuYqnHo+sCmZaVlacMREOnKsdJN+dIQOZv6 I44z7YrgnhoDtDN4Naa/N45UgXCbOCy/obmmv16IBzFTk2QTD8MQ123gCm+/KrZJVSP2 cCgZ6VH0TB1NHh20RDkZvs6SYGM3hx2wCa9KeDedQw48d6QfxEj3qu4ltiJxHN1knNcy nShSeiDe67Bv61HTJ+WfvAv/H/9dDG8/AqNUFviRTJrBjnleAAcuFxGw6Hzr/KMV8tvu bolKFb0dHEYehzfYz4A6FGqWhqzw4VeFCBAQhbTs2Pxihln86WTzVh2w7D2IG3O9Spi0 bcJg== X-Gm-Message-State: AEkooutRSoNbNNWLadUbabxXFk2yX61TPSaVQG2+TEAj9eNGtyp2T79kcdRWgeSjA14fWPPBEy757l1fsMG73A== X-Received: by 10.176.68.226 with SMTP id n89mr7759708uan.98.1471039508647; Fri, 12 Aug 2016 15:05:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 12 Aug 2016 22:04:58 +0000 Message-ID: To: PHP internals , bishop@php.net Content-Type: multipart/alternative; boundary=94eb2c097a385d2ed20539e71308 Subject: Re: [PHP-DEV][RFC] Fixing #72733 : Implement getaddrinfo From: dave@mudsite.com (David Walker) --94eb2c097a385d2ed20539e71308 Content-Type: text/plain; charset=UTF-8 On Thu, Aug 11, 2016 at 6:50 PM Bishop Bettini wrote: > I feel the weight of new functions, but really getaddrinfo is meant to > both simplify and unify how sockets are dealt with in the modern era. > socket_getaddrinfo converts the returned linked list into an array of, > essentially, socket contexts. The user can inspect those contexts and > choose the one he wants to use in connect and bind. Simple. > > With a few minor tweaks to naming (to lump all the addrinfo functions > together), this makes sense to me: > > $contexts = socket_addrinfo_lookup($node, $service, $hints); > foreach ($contexts as $context) { > print_r(socket_addrinfo_explain($context)); > } > $socket = socket_addrinfo_connect($contexts[1]); > // ... > > So I would lean toward flavor #1. Thanks! > Bishop, Thanks, I was really thinking that #1 would be preferred over altering argument types to long-existing functions. I have updated the RFC to include only it's implementation as well as changed the function names. -- Dave --94eb2c097a385d2ed20539e71308--