From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: HaiJun Zhang Newsgroups: gmane.emacs.devel Subject: Re: Is it possible to change the recv buffer size dynamically for network process or subprocess? Date: Sun, 29 Mar 2020 09:41:56 +0800 Message-ID: References: <1de1c276-1bda-4ada-b3f4-7adaee296628@Spark> <837dz9c0n2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="5e7ffce9_392edbe4_6dce" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2511"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Robert Pluim , Emacs developers To: Noam Postavsky , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 29 03:43:23 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIMyw-0000X1-Eg for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Mar 2020 03:43:22 +0200 Original-Received: from localhost ([::1]:33442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIMyv-0001l8-Fc for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 21:43:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55118) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIMxy-0001LH-Mq for emacs-devel@gnu.org; Sat, 28 Mar 2020 21:42:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIMxw-00059U-5a for emacs-devel@gnu.org; Sat, 28 Mar 2020 21:42:21 -0400 Original-Received: from mail-oln040092255047.outbound.protection.outlook.com ([40.92.255.47]:9172 helo=APC01-HK2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jIMxo-0004vX-9O; Sat, 28 Mar 2020 21:42:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ldbNyaaouQf1yveNbiZc48C2QgjygLwoeC7oqsi2JTWoZ6Bm7IDA/6e8U9YypeSYXrcPGfosyC/bXZjTOHwHavNHIVeGNe9erxiItm5lUr6LBxEpBsC7RtjR0+ES9Pvfgpipwdb0UciVEFemZ6wBoJpXoazzwOrA0Od/OgQ/eEioJL0lYZkK7nUF2GLXW5Mhy7AFdgt9yZ+tE1DtLWGO2LekZu++79pMmeFoDqPeeHoVOSvU1XvpJyA1oyZCfG4BDKk1Biak7pzSeELQ5E9U46r91uKhosyyHqJ7Rbjv8JP/76wL8gk5+pQoOv5EaBzhyAMMzhso6VePdHVDvxDoxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1zfTqoIhNmfetBHOwtgkKIAUQrUv9tfvqEyUb3UjM/A=; b=f4kGtO4trO0SEgxVwPK/IxW+T2UGu7Kd+v1QNLe3c0kYqsxWOAGwww1GOyxCnH1MGfyGjJQ+66/M1epGWqAcMqgFP94mCqzNmLgaYc9deu0FRQFLpINweIsGc42ZJvVj7P/oKa3owTVnPp+M02KtK90bFiPgpdJq2Y3o8vwvewOT14HX/wnZXlMBa2RuWr12ASRQyp2dYoGrjAbZgVGOmbgZrXo9XJmKbKJLJYiwt6I9IlY2DHmqrX9uCrs+QCR8yurstB2PIE8CJeKO6AtbOoEApo2UGfbDHwWB8EGGKLsP4SaTwOfwfAGu7ASJjV3hKvf23o+DyZoAHGZQB8o+uw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1zfTqoIhNmfetBHOwtgkKIAUQrUv9tfvqEyUb3UjM/A=; b=lyaLEXU/dO0zyByXkjLh9BP+eiNoH8OuArF82poL6iele8u2ZNyibcd8+Gd3QqflBm8tWzCWQHXegLoOUzznmKjnRi9nrbVPSA3fYQNbcc3hDhwrf7VImd012PmAUpcu0jqJ7UnJAb7RC1pSQ+RPbWAWOk1uVd62W7xUrgq1fvHan8busm5ldMLABvAhhp6rh+HM/5ax+Y10twNjUJP2ncZETiLw9n9Tnagca9wPUDdLvbrh9sLbXYR1l5uN/tpPj/ySzdeWmffeG/Y3Wqc63gC5Zz399qwV8SOwa7HKrfynSKo6mLH0Brpoo9g/8FCQpCcC16QxYoTsJtvZhDDR9g== Original-Received: from HK2APC01FT005.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::4d) by HK2APC01HT219.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::411) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17; Sun, 29 Mar 2020 01:42:06 +0000 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com (10.152.248.56) by HK2APC01FT005.mail.protection.outlook.com (10.152.248.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Sun, 29 Mar 2020 01:42:06 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:E8BEEB1162760F30BCE08DC3285869DFEA11C4BBBEA4E7574BDB79751D26BE96; UpperCasedChecksum:CE0E3426F8F0328CE9E8F9C4493F27BDC41AF57E669521E3CA0FB252088B5CA5; SizeAsReceived:9500; Count:49 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::85cb:c430:1173:7716]) by PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::85cb:c430:1173:7716%5]) with mapi id 15.20.2878.013; Sun, 29 Mar 2020 01:42:06 +0000 In-Reply-To: X-Readdle-Message-ID: bee0a673-be96-4601-84d3-5f2842ab4f2b@Spark X-ClientProxiedBy: HK2PR02CA0193.apcprd02.prod.outlook.com (2603:1096:201:21::29) To PS1PR03MB3606.apcprd03.prod.outlook.com (2603:1096:803:4e::17) X-Microsoft-Original-Message-ID: X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [192.168.1.150] (1.196.186.57) by HK2PR02CA0193.apcprd02.prod.outlook.com (2603:1096:201:21::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20 via Frontend Transport; Sun, 29 Mar 2020 01:42:05 +0000 X-Readdle-Message-ID: bee0a673-be96-4601-84d3-5f2842ab4f2b@Spark X-Microsoft-Original-Message-ID: X-TMN: [tHa6Hg5sGLhK9S6qXrXvBTuOvzZ7O9a4] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8c396d4c-9c4d-487c-9bac-08d7d3826363 X-MS-TrafficTypeDiagnostic: HK2APC01HT219: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1l0Yr9lRMCzFEV84zLbH/YtXd/jd5mZd0DMHF4SQljPWeq0ZIse3Cl0zm2Euie6d+k2roYswb5MMswzGInjkgEFSocCl40PrjTHMsqdaLgWc3kz0dnh2SF4g6eNRdD0duoOxGCo+uhSrp9280C+ZTjukTtTvZtqh1MUihqqMGdFDlk5zxbCWXTodofvc++b+ X-MS-Exchange-AntiSpam-MessageData: B3yFTnvqNjkVkx1pQPGeH1RXYpSf27eZocYSdITaNaMapm+rYuVja9PFdcncBGfvlCBWgDO5J3XSTtue9l9KzZODNLdbfgnY5IMP6fLwJv51E0wFE7lD+bmJ9yvXfHVS4os+dbEYzCUXt6KGq5ZTkQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c396d4c-9c4d-487c-9bac-08d7d3826363 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2020 01:42:06.6573 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT219 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.255.47 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245917 Archived-At: --5e7ffce9_392edbe4_6dce Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =E5=9C=A8 2020=E5=B9=B43=E6=9C=8827=E6=97=A5 +0800 AM1:34=EF=BC=8CStefan = Monnier =EF=BC=8C=E5=86=99=E9=81=93=EF=BC=9A > > Doesn't setting the process-filter to t do this=3F (except for the > > override part, I guess) > > > > (set-process-filter PROCESS =46ILTER) > > > > Give PROCESS the filter function =46ILTER; nil means default. > > A value of t means stop accepting output from the process. > > =5B....=5D > > Ah, indeed you're right. > > It's a bit clunky (it means you need to temporarily store the filter > elsewhere and other code that may want to change the filter needs to > know where to find it), but that should be good enough for a start. > > HaiJun=3F > > > Stefan > Yes. Thanks. =C2=A0=40Noam Postavsky --5e7ffce9_392edbe4_6dce Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
=E5=9C=A8 2020=E5=B9=B43=E6=9C=8827=E6=97= =A5 +0800 AM1:34=EF=BC=8CStefan Monnier <monnier@iro.umontreal.ca>= ;=EF=BC=8C=E5=86=99=E9=81=93=EF=BC=9A
Doesn't setting the pr= ocess-filter to t do this? (except for the
override part, I guess)

(set-process-filter PROCESS FILTER)

Give PROCESS the filter function FILTER; nil means default.
A value of t means stop accepting output from the process.
[....]

Ah, indeed you're right.

It's a bit clunky (it means you need to temporarily store the filter
elsewhere and other code that may want to change the filter needs to
know where to find it), but that should be good enough for a start.

HaiJun?


Stefan

Yes. Thanks.  @Noam Postavsky
--5e7ffce9_392edbe4_6dce--