Thank you... I am aware of the implementation dependent solutions regarding networking. However, if you stick to USOCKET, would it be better to switch to an explicit loop, or is there some other incantation you could use to avoid the hanging read? Thanks Marco On Wed, Dec 17, 2025 at 3:11 PM David McClain <dbm@refined-audiometrics.com> wrote:
It sounds like you are using TCP/IP (the streaming protocol) vs UDP?
I have had tremendous success using the LW Asynchronous Socket interface for socket streams (TCP/IP). Size of sent phrases seems to make no difference to its performance. My transfers have arbitrary sizes and have no predictable length.
I do use a self-synchronizing encoding (Phuang) across the wire, and I think that ultimately becomes a length-prefix followed by data octets. And these packets come in a variety of sizes.
On Dec 17, 2025, at 01:01, Marco Antoniotti <marco.antoniotti@unimib.it> wrote:
Hi
I am reading from a uosocket:stream-usocket. My sequence is 100 octets long, but I know the other party is sending UP TO 100 octets.
If the other party sends less than 100 octets, read-sequence/usocket-stream (at least the version on LW) hangs.
Should I just do a loop, checking for the "end marker"?
Thanks
All the best
-- Marco Antoniotti
-- Marco Antoniotti, Professor, Director tel. +39 - 02 64 48 79 01 DISCo, University of Milan-Bicocca U14 2043 http://dcb.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY REGAINS: https://regains.disco.unimib.it/