unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: Erik Grun <egnun@mailbox.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Problems with running Network Socket Examples
Date: Sun, 10 Dec 2023 13:44:33 +0100	[thread overview]
Message-ID: <ZXWysS5mXYAKOQij@tuxteam.de> (raw)
In-Reply-To: <73b5a9c5-365a-429c-b7bd-649ee73982d7@mailbox.org>

[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]

On Sun, Nov 26, 2023 at 09:59:58PM +0100, Erik Grun wrote:
> Hello, Guile-Devel,
> 
> I just can't get the Network Socket Examples[1] to work. I am using Guile
> 3.0.7.
> 
> An obvious mistake seems to be, that the docs use different ports for client
> (80) and server (2904), but even if I use the same port (2904), I only get
> this error message:
> 
> Backtrace:
> In ice-9/boot-9.scm:
>    1752:10  6 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
>             5 (apply-smob/0 #<thunk 7f5e06560f60>)
> In ice-9/boot-9.scm:
>      724:2  4 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
> In ice-9/eval.scm:
>      619:8  3 (_ #(#(#<directory (guile-user) 7f5e06559c80>)))
> In ice-9/boot-9.scm:
>     2835:4  2 (save-module-excursion _)
>    4380:12  1 (_)
> In /home/egnun/client.scm:
>       7:14  0 (_)
> 
> /home/egnun/client.scm:7:14: Unbound variable: read-line
> 
> After some research I found out, that I need to include this line.
>      (use-modules (ice-9 rdelim))

Yes, I'd consider both of the above as downright doc bugs: the missing
of (ice-9 rdelim) in the client code and letting the client aim at a
different port the server is set up to listen to.

As for the third...

> When I do that, it seems to kinda work?
> 
> Hello client
> Backtrace:

[...]

> ERROR: In procedure %read-line:
> In procedure fport_read: Connection was reset by peer

... it is working "as it is supposed to": the server closes the
connection after sending the reply -- the client isn't set up
to expect this and complains (note that it dutifully prints the
server's answer "Hello client" before).

So this one is confusing, but we'd need a bit more of discussion
on how to "fix" it without complicating the examples too much.

Ideas?

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2023-12-10 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26 20:59 Problems with running Network Socket Examples Erik Grun
2023-12-10 12:44 ` tomas [this message]
2023-12-29  7:49   ` Erik Grun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZXWysS5mXYAKOQij@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=egnun@mailbox.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).