emacs-devel
[Top][All Lists]
Advanced

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

OPEN-NETWORK-STREAM connection timeout control?


From: DD
Subject: OPEN-NETWORK-STREAM connection timeout control?
Date: Tue, 09 Jan 2024 11:56:37 -0500
User-agent: mu4e 1.9.18; emacs 27.1



Hello,

I'm using OPEN-NETWORK-STREAM and am unsure about how to control how
long to wait for the connection to be established or timed out.

I'm fairly sure I would like the call to be synchronous, at least
until the point of establishing/timing out the connection.  It might
turn out that, for responsiveness perhaps, I would want to include the
:nowait keyword, but hopefully I can ignore that for now, because
after reading the doc and looking at the code I have confusion around
how that works wrt, at least, how the process object is delivered.

I would like a customizable timeout value so that if a service is down
emacs stays responsive and times out quickly, since I'm only
interested in making local area connections in this situation and I
want to move on quickly to try fallback service(s)..

I hoped there was a timeout keyword for O-N-S, but didn't find it.  I
looked at lots of other stuff regarding the process object and got
really side tracked.

I guess I could set an async timer before the O-N-S call and then
explicitly squelch the O-N-S call if the timer expires before I reset
it after O-N-S returns?

I'm looking at the elisp code for an example and coming up empty.
Would be grateful for any help, especially around what is idiomatic in
this situation, as well as alternative approches.
q
Thanks!



reply via email to

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