emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to change the recv buffer size dynamically for networ


From: HaiJun Zhang
Subject: Re: Is it possible to change the recv buffer size dynamically for network process or subprocess?
Date: Tue, 24 Mar 2020 12:33:11 +0800

在 2020年3月22日 +0800 PM11:12,Robert Pluim <address@hidden>,写道:
On Sun, 22 Mar 2020 09:26:37 +0800, HaiJun Zhang <address@hidden> said:

HaiJun> I want to do flow control, because too many data may cause UI
HaiJun> unresponsive. Set the recv buffer size to 4, and if I don’t fetch the
HaiJun> four bytes, please don’t receive more data. If the size (In the four
HaiJun> bytes header) is too big, ask the user if the message should be
HaiJun> received.

I donʼt see how this is any different from just doing recv, checking
the 4 bytes, and then asking the user. In any case, if the remote end
has sent you the message, it will be in the local kernel buffers
anyway, so you’ll have to read it at some point anyway.

With flow control, we can block the sender(for tcp or subprocess) for sometime to keep good responsiveness.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]