From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vivien Kraus via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: (web client) with suspendable ports Date: Thu, 15 Jul 2021 19:32:21 +0200 Message-ID: Reply-To: Vivien Kraus Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6218"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.34.2 To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Jul 15 19:32:48 2021 Return-path: Envelope-to: guile-user@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 1m45E7-0001QD-Sk for guile-user@m.gmane-mx.org; Thu, 15 Jul 2021 19:32:47 +0200 Original-Received: from localhost ([::1]:50198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m45E6-0003VT-V3 for guile-user@m.gmane-mx.org; Thu, 15 Jul 2021 13:32:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m45Du-0003U5-EU for guile-user@gnu.org; Thu, 15 Jul 2021 13:32:34 -0400 Original-Received: from planete-kraus.eu ([2a00:5881:4008:2810::309]:37464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1m45Ds-00041D-Ei for guile-user@gnu.org; Thu, 15 Jul 2021 13:32:34 -0400 Original-Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 30906e04 for ; Thu, 15 Jul 2021 17:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:date:content-type:mime-version :content-transfer-encoding; s=*; bh=nLGp8C+TCTHs8NR7NYqRCVlkfTM=; b= JIh5APNkRCXXmaGgu9n6oYjhxY5VMDmsV1xVpvF+jn2ARFniQNxLGmSdl4+Y7N9Y Omfn3ahT0fLFJ/8MoYB7XZOPNhC+NAmQSVKL19y/bJlJfM5SYgD0WXZ7HgJ8yF/W roQmH0Nd4YTsBUZytna4Jbba3OvfFMdgwjl9PgepPhk= Original-Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id f5fa4162 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO) for ; Thu, 15 Jul 2021 17:32:23 +0000 (UTC) Received-SPF: pass client-ip=2a00:5881:4008:2810::309; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17648 Archived-At: Dear guile users, (web client) defines a few handy methods to make requests, such as http-get. I would like to try the suspendable ports interface, so that while I wait for the server to send the response, I can do something else. However, it requires that the socket port is passed the O_NONBLOCK flag. For HTTP URIs, it is possible since open-socket-for-uri returns a file port. However, it is not the case for HTTPS URIs. The guile web client should let me set this flag early (before TLS negociation) so that I can avoid blocking because of a malicious (or buggy) server. Ideally, DNS lookup should be non-blocking too. Or is there a way to do this that I missed? Best regards, Vivien