Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126559 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id C37B51A00BC for ; Mon, 3 Mar 2025 21:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741036707; bh=d9tX7tuku8sjjdwB+02HDm5NFy/t4/N1wwzmEvaync0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Ft8Z0gQdljViC9QadLP6WiKi3Tz7xMN3hEwpM16/spTvVypqelQMxdY3l9h5/aJJK isFfCXHpXgH8V05to7pDffHCA3vWAJgZPSSKvNk6BkH3SRTWESTPbolWVgsiV7qO7P /T2+N0iTuMvCvyDIkPX7InE2mvF6WpbcH9oDMbKWEpasqEJ7RLX4YkxvDeln3KikO1 uNNrG+Rf2gyUH3Vn7LEIU4Fmzv5LuGkF2KiuzLD9Sid08TMxI9pU6OXYnOw8obnWHm ZAXeUISltou5eEKgvvwTDXprqAuT9TXThaOoXel7aQGjQ7CriBx1xWW5dOXGYa1xzc Wg+Gi/veoa3iw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5CBBB180080 for ; Mon, 3 Mar 2025 21:18:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_40,DMARC_NONE, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 3 Mar 2025 21:18:26 +0000 (UTC) Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-2bcbd92d5dbso2382658fac.2 for ; Mon, 03 Mar 2025 13:21:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741036862; x=1741641662; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d9tX7tuku8sjjdwB+02HDm5NFy/t4/N1wwzmEvaync0=; b=hVmIO+SAAFtyd60k2FQj5KnjjpIGsCbInjDZMCWlGeTCnrf4SZ170cYi2am+NjyVg6 iFi2dC/41kY6XL8IHUCXyxU93OapCuMj5M5HJSUJBlrH9+xJEIiNsOuA/q/3PuYIFcCl ZQ9OiSVszggEs5L7j9+uZktiIpuJXxPkCQybUlhpOg9Q98WR2dGCrSMU1wAbFen0JDe8 Tnm2QtiX5yHHBxv58BpSxv6YbGP9TsS8puj99gwgS7GzzyUQtP/NKOEgBfwaubFO11b+ 6biUZ05GsBbizgbCf5XQz62UjgW1cdwuZJh4ajtp4SwfvOcXmV3co9U3K69cwfguVaMp jchg== X-Gm-Message-State: AOJu0Yx0oBFC4SpNJt/eZk8VC5v5ipRrhH2lspmY9hxs9BjKs8PowBMq omH6e1//W63WNM4hRjDvOvUI3bGYVNjKvJTIicd3m+PuG0mch9nDzKNePotYf8t5OqFEgDcHSb8 FoX0BLEO+IZ6XkLuWeUEd5MmaQPQ= X-Gm-Gg: ASbGncvuZIC+LI6VRJAKYoEnqb0EKf7+w+gJVV3/AMnki8sQ0YAvdNnWX8sj+ALbpJk oLtbJFenAoCcIaGjgF761AZQfkvv2vKn4WALvMAD2bKbRzPJjFXYpBWhdRG363FPalcD79FL9Ch TvLELpYbToHSat7cpgQYrPVpdTcw== X-Google-Smtp-Source: AGHT+IGDONG7EP4tzdOxFJ8IhHvnl0pDM9EMz1v5mRQwejRTe2iwttRRyykl6p7AFbmgZCr84AroCQTyVHJspWVxBec= X-Received: by 2002:a05:6871:209:b0:29f:de75:d178 with SMTP id 586e51a60fabf-2c1784e4bccmr8396448fac.19.1741036861944; Mon, 03 Mar 2025 13:21:01 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 3 Mar 2025 22:20:50 +0100 X-Gm-Features: AQ5f1JpMlzjx7eUNZVHdtYPZ7pYQauYn-zAEvmg1fKx8Vz9pBKDTymz6wleFEKk Message-ID: Subject: Re: [PHP-DEV] PHP socket ethernet support - step 2 To: David CARLIER Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000b2791d062f76bb4d" From: bukka@php.net (Jakub Zelenka) --000000000000b2791d062f76bb4d Content-Type: text/plain; charset="UTF-8" Hi, > I am working on the second pass of this feature and write here because of > the legitimate concern regarding new classes to add. > > PR here > For those that want to quickly see the actually classes, here is a stub link: https://github.com/php/php-src/pull/17926/files#diff-190e64a9475f39f2b575e6032d6539b504b33fe534965e5bb3512fe430fe1846 > I agree also on adding a namespace on top (Sockets ?) and changing the > class names. > I think it would be good to note that there are already two classes defined in socket extension: final class Socket { } final class AddressInfo { } So it might look a bit strange if those two are not namespaced and the new ones are. The AddressInfo is a bit unfortunate name though. The namespace seems cleaner but not sure if prefix would be more consistent. Although having SocketPacket is not exactly nice so probably Socket\Packet is better. But I don't really mind. I would just really prefer to not introduce those classes without namespace or prefix. Regards Jakub --000000000000b2791d062f76bb4d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,<= /div>
=C2=A0
I am working on the second pass of this featu= re and write here because of the legitimate concern regarding new classes t= o add.


<= /div>
For those that want to quickly see the actually classes, here is = a stub link:=C2=A0ht= tps://github.com/php/php-src/pull/17926/files#diff-190e64a9475f39f2b575e603= 2d6539b504b33fe534965e5bb3512fe430fe1846=C2=A0
=C2=A0
I agr= ee also on adding a namespace on top (Sockets ?) and changing the class nam= es.

I think it would be good to= note that there are already two classes defined in socket extension:
=

final class Socket
{
}

final class AddressInfo<= br>{
}=C2=A0

So it might look a bit strang= e if those two are not namespaced and the new ones are. The AddressInfo is = a bit unfortunate name though. The namespace seems cleaner but not sure if = prefix would be more consistent. Although having SocketPacket is not exactl= y nice so probably Socket\Packet is better. But I don't really mind. I = would just really prefer to not introduce those classes without namespace o= r prefix.

Regards

Jakub
--000000000000b2791d062f76bb4d--