[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues with socket.fs on OpenBSD
From: |
Tomas Hlavaty |
Subject: |
Re: Issues with socket.fs on OpenBSD |
Date: |
Sun, 04 Sep 2022 08:51:52 +0200 |
On Sat 03 Sep 2022 at 10:23, nature <nature@blazebone.com> wrote:
> Then I tried something simpler like the echo server wrom
> rosettacode: https://rosettacode.org/wiki/Echo_server#Forth and this
> didn't work as well.
>
> I then tried to insert some ." at different places and I realized that
> create-server and accept-socket works, it's read-socket that
> fails/blocks indefinitely. When going deeper and trying to figure out
> where exactly in read-socket things were blocking, I found that it's the
> recv call that blocks/fails. I wasn't able to figure out more than
> that...
It seems that read-socket is trying to provide some kind of higher lever
blocking API I do not understand.
You can see the source code for read-socket with the following commands:
• (eepitch-shell)
• (eepitch-kill)
• (eepitch-shell)
gforth
require unix/socket.fs
view read-socket
view (rs)
Using read and write instead of read-socket and write-socket worked for
me, see the attached forking echo server example.
echo-server9.fs
Description: Text document