Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I dunno, I dream in Perl sometimes... -- Larry Wall in <8538@jpl-devvax.JPL.NASA.GOV>


devel / comp.lang.tcl / Re: ANNOUNCE: iocp 1.1.0

SubjectAuthor
* ANNOUNCE: iocp 1.1.0Ashok
+- Re: ANNOUNCE: iocp 1.1.0Harald Oehlmann
+* Re: ANNOUNCE: iocp 1.1.0Michael Niehren
|`- Re: ANNOUNCE: iocp 1.1.0Ashok
`* Re: ANNOUNCE: iocp 1.1.0David Gravereaux
 `* Re: ANNOUNCE: iocp 1.1.0Ashok
  +* Re: ANNOUNCE: iocp 1.1.0Harald Oehlmann
  |`- Re: ANNOUNCE: iocp 1.1.0David Gravereaux
  +* Re: ANNOUNCE: iocp 1.1.0David Gravereaux
  |`- Re: ANNOUNCE: iocp 1.1.0David Gravereaux
  `* Re: ANNOUNCE: iocp 1.1.0David Gravereaux
   `* Re: ANNOUNCE: iocp 1.1.0Ashok
    `* Re: ANNOUNCE: iocp 1.1.0David Gravereaux
     `* Re: ANNOUNCE: iocp 1.1.0Petro Kazmirchuk
      `* Re: ANNOUNCE: iocp 1.1.0apn
       `- Re: ANNOUNCE: iocp 1.1.0Harald Oehlmann

1
ANNOUNCE: iocp 1.1.0

<sa6gjt$tlj$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17227&group=comp.lang.tcl#17227

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: palmtcl@yahoo.com (Ashok)
Newsgroups: comp.lang.tcl
Subject: ANNOUNCE: iocp 1.1.0
Date: Mon, 14 Jun 2021 08:28:04 +0530
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <sa6gjt$tlj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Jun 2021 02:58:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="66785ee4ac3d646c24bca1c159db3e95";
logging-data="30387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HKHnscW9Oy9dWWnNI8Qaa"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Cancel-Lock: sha1:ik3FO5CYQIwxKm9QgymaIskWl0k=
Content-Language: en-US
X-Mozilla-News-Host: snews://news.eternal-september.org:563
 by: Ashok - Mon, 14 Jun 2021 02:58 UTC

# Packages iocp, iocp_inet, iocp_bt

Tcl extension implementing TCP and Bluetooth channels based on
I/O completion ports. The iocp_inet package is API-compatible
with Tcl sockets while offering much higher performance. The iocp_bt
package supports Bluetooth (not Bluetooth LE) client sockets.

Requires Tcl 8.6 and Windows 7 or later.

Binary downloads are at
https://sourceforge.net/projects/magicsplat/files/iocp/.

Repository is at https://github.com/apnadkarni/iocp

Documentation at https://iocp.magicsplat.com.

## Changes in 1.1.0

- enable lazy loading of Bluetooth so TCP sockets can still be used on
servers
without Bluetooth libraries installed
- fixed crash in Bluetooth asynchronous connect
- fixed reversed sense of -nagle option to TCP sockets

Re: ANNOUNCE: iocp 1.1.0

<sa6v55$ek$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17228&group=comp.lang.tcl#17228

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wortkarg2@yahoo.de (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Mon, 14 Jun 2021 09:06:17 +0200
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <sa6v55$ek$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Jun 2021 07:06:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e4140b90fdcb3b9564859268528102dc";
logging-data="468"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18q71qgpyAQu8ED98QsS8Q6"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:vmMpMBBtGiUbP847aHQvMyttRKU=
In-Reply-To: <sa6gjt$tlj$1@dont-email.me>
Content-Language: en-GB
 by: Harald Oehlmann - Mon, 14 Jun 2021 07:06 UTC

Am 14.06.2021 um 04:58 schrieb Ashok:
> # Packages iocp, iocp_inet, iocp_bt
>
> Tcl extension implementing TCP and Bluetooth channels based on
> I/O completion ports. The iocp_inet package is API-compatible
> with Tcl sockets while offering much higher performance. The iocp_bt
> package supports Bluetooth (not Bluetooth LE) client sockets.
>
> Requires Tcl 8.6 and Windows 7 or later.
>
> Binary downloads are at
> https://sourceforge.net/projects/magicsplat/files/iocp/.
>
> Repository is at https://github.com/apnadkarni/iocp
>
> Documentation at https://iocp.magicsplat.com.
>
> ## Changes in 1.1.0
>
> - enable lazy loading of Bluetooth so TCP sockets can still be used on
> servers
> without Bluetooth libraries installed
> - fixed crash in Bluetooth asynchronous connect
> - fixed reversed sense of -nagle option to TCP sockets

Ashok, great work, thank you !

The point to have TCL/IP available with BlueTooth not installed is good.
That removes another trap. I do only include the BlueTooth library, if I
really need BlueTooth.

I am in Barcode Reader Business and we have a lot of BlueTooth.
Unfortunately, they all change to BTLE now.

Thank you and take care,
HGarald

Re: ANNOUNCE: iocp 1.1.0

<nnd$75ab5d3f$52de9ae9@d2e1b57808db7698>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17341&group=comp.lang.tcl#17341

  copy link   Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Newsgroups: comp.lang.tcl
References: <sa6gjt$tlj$1@dont-email.me>
From: michael@niehren.de (Michael Niehren)
Date: Tue, 22 Jun 2021 15:23:25 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <sa6gjt$tlj$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-DE
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$75ab5d3f$52de9ae9@d2e1b57808db7698>
Organization: www.abavia.com
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!feed.abavia.com!abe002.abavia.com!abp001.abavia.com!reseller!not-for-mail
Lines: 32
Injection-Date: Tue, 22 Jun 2021 15:23:25 +0200
Injection-Info: reseller; mail-complaints-to="abuse@abavia.com"
 by: Michael Niehren - Tue, 22 Jun 2021 13:23 UTC

Am 14.06.21 um 04:58 schrieb Ashok:
> # Packages iocp, iocp_inet, iocp_bt
>
> Tcl extension implementing TCP and Bluetooth channels based on
> I/O completion ports. The iocp_inet package is API-compatible
> with Tcl sockets while offering much higher performance. The iocp_bt
> package supports Bluetooth (not Bluetooth LE) client sockets.
>
> Requires Tcl 8.6 and Windows 7 or later.
>
> Binary downloads are at https://sourceforge.net/projects/magicsplat/files/iocp/.
>
> Repository is at https://github.com/apnadkarni/iocp
>
> Documentation at https://iocp.magicsplat.com.
>
> ## Changes in 1.1.0
>
> - enable lazy loading of Bluetooth so TCP sockets can still be used on servers
> without Bluetooth libraries installed
> - fixed crash in Bluetooth asynchronous connect
> - fixed reversed sense of -nagle option to TCP sockets

Hi Ashok,

any chance to get it running under Linux ?

It would be very nice to have, as i can then program Lego Boost with an Tcl-GUI under Linux.

best regards
Michael

Re: ANNOUNCE: iocp 1.1.0

<sat0cq$6v1$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17342&group=comp.lang.tcl#17342

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: palmtcl@yahoo.com (Ashok)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Tue, 22 Jun 2021 21:12:14 +0530
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <sat0cq$6v1$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me>
<nnd$75ab5d3f$52de9ae9@d2e1b57808db7698>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 22 Jun 2021 15:42:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0ef95dbb13ed0bab037940858d587996";
logging-data="7137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gcpF0Zkew6XeHskZfd2E2"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:T7RY0Zyt1QyZUsm8GMMtD/hqeU0=
In-Reply-To: <nnd$75ab5d3f$52de9ae9@d2e1b57808db7698>
Content-Language: en-US
 by: Ashok - Tue, 22 Jun 2021 15:42 UTC

Afraid not. As its name implies, the iocp package's reason for existence
is to make use of IOCP ports on Windows and is completely tied to that
facility.

Assuming you are interested in Bluetooth for Linux, you might look at
the bluez libraries, either invoke via exec, write bindings or call via
an FFI extension, or perhaps use Python's PyBluez extension. A Tcl
extension based on bindings or FFI would be great!

Androwish also has bluetooth support iirc but not sure if it is tied to
Android API's.

/Ashok

On 6/22/2021 6:53 PM, Michael Niehren wrote:
>
> Hi Ashok,
>
> any chance to get it running under Linux ?
>
> It would be very nice to have, as i can then program Lego Boost with an
> Tcl-GUI under Linux.
>
> best regards
>   Michael

Re: ANNOUNCE: iocp 1.1.0

<sauod4$m0k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17348&group=comp.lang.tcl#17348

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: davygrvy@pobox.com (David Gravereaux)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Wed, 23 Jun 2021 00:38:11 -0700
Organization: Organized?! Are you kidding? NONE, it's anarchy!
Lines: 41
Message-ID: <sauod4$m0k$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="ORNVwJhBmC8anKiRtwbnDSzkN0hlFvGzA"
Injection-Date: Wed, 23 Jun 2021 07:38:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4fee68bc0ceb3e786f79b51cf32e192b";
logging-data="22548"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lwX5zOJ2k/FwJip8cLM4a1IzLkfP+69M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Cancel-Lock: sha1:HoRh1us7SCdrxZAJ71aJnyk/+C4=
In-Reply-To: <sa6gjt$tlj$1@dont-email.me>
 by: David Gravereaux - Wed, 23 Jun 2021 07:38 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

Nice code

--
David Gravereaux
<davygrvy@pobox.com>

$ make war
make: *** No rule to make target `war'. Stop.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: ANNOUNCE: iocp 1.1.0

<savk84$m20$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17355&group=comp.lang.tcl#17355

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: palmtcl@yahoo.com (Ashok)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Wed, 23 Jun 2021 21:03:24 +0530
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <savk84$m20$3@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 23 Jun 2021 15:33:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c28523b5a4f4719a6d73dc8d86004d98";
logging-data="22592"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+63myNXsgAG3uZb9X2O1ao"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:cHon/PExFUwBjb/S6LhAoAgE6PY=
In-Reply-To: <sauod4$m0k$1@dont-email.me>
Content-Language: en-US
 by: Ashok - Wed, 23 Jun 2021 15:33 UTC

Thanks David. Nice to hear from one of the original Windows Tcl guys :-)

On 6/23/2021 1:08 PM, David Gravereaux wrote:
> Nice code
>
>

Re: ANNOUNCE: iocp 1.1.0

<savl3j$u88$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17356&group=comp.lang.tcl#17356

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wortkarg2@yahoo.de (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Wed, 23 Jun 2021 17:48:04 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <savl3j$u88$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 23 Jun 2021 15:48:03 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="49da1860cdc2ece9f0e8fea1f485887f";
logging-data="30984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oRkwffYjzEAm2yUBzs/qm"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:8EhC8gqAe/ncVuGICWDQjcq39IM=
In-Reply-To: <savk84$m20$3@dont-email.me>
Content-Language: en-GB
 by: Harald Oehlmann - Wed, 23 Jun 2021 15:48 UTC

Am 23.06.2021 um 17:33 schrieb Ashok:
> Thanks David. Nice to hear from one of the original Windows Tcl guys :-)
>
> On 6/23/2021 1:08 PM, David Gravereaux wrote:
>> Nice code
>>
>>
>

Yes, great to read from you, David! Next step is to get it in the core ;-)

Thank you all for your constant support and work,
Harald

Re: ANNOUNCE: iocp 1.1.0

<sb0a1f$hf3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17359&group=comp.lang.tcl#17359

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: davygrvy@pobox.com (David Gravereaux)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Wed, 23 Jun 2021 14:45:17 -0700
Organization: Organized?! Are you kidding? NONE, it's anarchy!
Lines: 59
Message-ID: <sb0a1f$hf3$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="CDb9sjI2iScxwpPRIZvfixScrPqJdG4gH"
Injection-Date: Wed, 23 Jun 2021 21:45:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4fee68bc0ceb3e786f79b51cf32e192b";
logging-data="17891"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19m+fGORLOsNcD2hUu/UtSNq998Zf3nO9U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Cancel-Lock: sha1:ijeyMUOPvraDWnEVKX95O6zBkbI=
In-Reply-To: <savk84$m20$3@dont-email.me>
 by: David Gravereaux - Wed, 23 Jun 2021 21:45 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

On 6/23/21 8:33 AM, Ashok wrote:
> Thanks David. Nice to hear from one of the original Windows Tcl guys :-)

I'm enjoying reading through your source. I like your organization..
inet and bt as modules are perfect. As I'm sure you're aware, an IOCP
generic layer could even support more native handle types such as file,
pipes, and console.

Async cross-protocol name resolving with naming services got me stuck at
the end.

I have so much more to say, but I'll need time to organize my thoughts.

Are you doing the three modes of I/O: zero-byte, flow-controlled, and
burst with growth?

This has my blessing

--
David Gravereaux
<davygrvy@pobox.com>

$ make war
make: *** No rule to make target 'war'. Stop. Try `love' instead.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: ANNOUNCE: iocp 1.1.0

<sb0a6s$hf3$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17360&group=comp.lang.tcl#17360

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: davygrvy@pobox.com (David Gravereaux)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Wed, 23 Jun 2021 14:48:12 -0700
Organization: Organized?! Are you kidding? NONE, it's anarchy!
Lines: 44
Message-ID: <sb0a6s$hf3$2@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <savl3j$u88$1@dont-email.me>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="M1Acjbu6sZD5vvhpYlSMdZJUtkaTlcen5"
Injection-Date: Wed, 23 Jun 2021 21:48:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4fee68bc0ceb3e786f79b51cf32e192b";
logging-data="17891"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fC9spuYgoGCSvKpWM9gBVPV7uR0nOKFo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Cancel-Lock: sha1:7SrSCGRXw/DGTjKEz9jbnLrPiiU=
In-Reply-To: <savl3j$u88$1@dont-email.me>
 by: David Gravereaux - Wed, 23 Jun 2021 21:48 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

On 6/23/21 8:48 AM, Harald Oehlmann wrote:
> Next step is to get it in the core ;-)

DO IT!

--
David Gravereaux
<davygrvy@pobox.com>

$ make war
make: *** No rule to make target 'war'. Stop. Try `love' instead.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: ANNOUNCE: iocp 1.1.0

<sb7a7q$77s$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17373&group=comp.lang.tcl#17373

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: davygrvy@pobox.com (David Gravereaux)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Sat, 26 Jun 2021 06:31:36 -0700
Organization: Organized?! Are you kidding? NONE, it's anarchy!
Lines: 77
Message-ID: <sb7a7q$77s$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <sb0a1f$hf3$1@dont-email.me>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="NEBl3Xj9sqaTcKzr3lxjN9i0i0PJFdebt"
Injection-Date: Sat, 26 Jun 2021 13:31:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3fa6757c3a81e403d112f790e8e4f0bf";
logging-data="7420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+S6oM4V1tVyRIEo3LRh7S3qJiI0cc5nrc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:ecbMWXH+lwKdSAYiPheUmi30GFY=
In-Reply-To: <sb0a1f$hf3$1@dont-email.me>
 by: David Gravereaux - Sat, 26 Jun 2021 13:31 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

Ashok,

A long time ago, I wrote a channel driver just like this. Please use it
for ideas (and stuff) if you want.
https://sourceforge.net/projects/iocpsock/

On 6/23/21 2:45 PM, David Gravereaux wrote:
> Are you doing the three modes of I/O: zero-byte, flow-controlled, and
> burst with growth?

The complexity to support numerous outstanding overlapped operations got
a bit tricky ;) but I needed to make it that way so I could experiment
to find what works best ..to then later rip-out what I considered not
worthy.

Initially, the goal of the project was to fix a bug in Windows about
2003. Under heavy abuse, Winsock's accept() would just stop working.
My best guess was that some internal resource was getting drained dry.
I later found that connect() had the same problem, too. This was for a
web server so I chose to go with the higher level of I/O performance
using IOCP, too, for the channel driver.

So initially, posting numerous overlapped AcceptEx() calls was the idea
for hardness. And it worked. The more, the better.

What I did find later on, was the recv-mode I called flow-controlled was
a waste. Just use zero-byte with the internal socket buffer the size of
channel buffer. Or something like that, I don't recall exactly. The
cost in time with the extra memcpy didn't seem worthy. Just let a
non-overlapped ReceiveEx copy right into the channel buffer. In this
case, zero is better than one.

Did my burst-detect work? Yes, it would get hit and increase. Worth
it? Not sure. Not wrong. YMMV

Well, this is all I can remember at the moment
--
David Gravereaux
<davygrvy@pobox.com>

$ make war
make: *** No rule to make target `war'. Stop. Try `love' instead.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: ANNOUNCE: iocp 1.1.0

<sbibrj$43h$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17396&group=comp.lang.tcl#17396

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: davygrvy@pobox.com (David Gravereaux)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Wed, 30 Jun 2021 11:06:41 -0700
Organization: Organized?! Are you kidding? NONE, it's anarchy!
Lines: 59
Message-ID: <sbibrj$43h$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="YqbmrwbR8tzQtfbQcdzBeo47r2bDPAUpu"
Injection-Date: Wed, 30 Jun 2021 18:06:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8dc671e3bb8239fa5396175aebeea197";
logging-data="4209"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z6PC/vNYlJ6GbcAgxK4qhNrObDEjT6Hc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:XWmHpeuk9QC3ADQKmTkz5bPsDgI=
In-Reply-To: <savk84$m20$3@dont-email.me>
 by: David Gravereaux - Wed, 30 Jun 2021 18:06 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

On 6/23/21 8:33 AM, Ashok wrote:
> Thanks David. Nice to hear from one of the original Windows Tcl guys :-)

I love your work and think it will be a great benefit for the community.

One thing to watch out for... The main service thread that runs the
loop on GetQueuedCompletetionStatus() is rather sensitive to thread
synchronization.

https://github.com/apnadkarni/iocp/blob/22fe8456e3b98f4186fc3eeda60739e73abfa686/win/tclWinIocpThread.c#L243

You will get the best performance by avoiding any calls to
criticalsection syncing. Please avoid them at all cost. Even consider
special "atomic" linked list procedures. Maybe this could be a project
goal for later?

As an example: https://kukuruku.co/post/lock-free-stack-for-windows/

--
David Gravereaux
<davygrvy@pobox.com>

$ make war
make: *** No rule to make target `war'. Stop. Try `love' instead.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: ANNOUNCE: iocp 1.1.0

<sbjnp4$68v$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17397&group=comp.lang.tcl#17397

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: palmtcl@yahoo.com (Ashok)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Thu, 1 Jul 2021 12:06:19 +0530
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <sbjnp4$68v$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <sbibrj$43h$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Jul 2021 06:36:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ba90981b1ad05f3ba9560e8d26fd1ff1";
logging-data="6431"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18H0h42ws5IxaN5wZj2FR2r"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:wbiUBdOzLhK/MsRQ9zMXf2h0ZV0=
In-Reply-To: <sbibrj$43h$1@dont-email.me>
Content-Language: en-US
 by: Ashok - Thu, 1 Jul 2021 06:36 UTC

Hi David,

Tx again for your interest and input. With respect to your suggestions,
as a general comment I'll say I don't plan to spending any time on
changes to iocp (except bug fixes of course) wrt the TCP component. It
is fast enough (anywhere from 2-10 times faster than Tcl's socket for
depending on traffic loads), stable and I have other fish (projects) to fry.

Having said that, some comments on your suggestions -

- Regarding zero-byte copies - this is also suggested in the "Network
Programmin for Windows" book (two decades old but still the reference
for Winsock). I did implement this as a strawman but found no
measureable difference in either throughput or CPU. My guess is that the
reduced byte copies are offset by increased kernel transitions (one to
post the zero byte and a second one to then read from the kernel). So
added complexity for no measurable gain.

- Regarding critical sections / thread synchronization - I'm not sure if
you noticed but the channel locking is based on SRWLocks, not critical
sections unless you specifically compile for XP which does not support
the former. Nevertheless, I would not think there is really a need to
avoid critical sections either. Unless there is contention, they do not
transition to the kernel (which is expensive) and contention is limited
because there are at most two threads competing for a channel - the Tcl
thread owning the channel and the iocp thread. Given how much work the
Tcl channel subsystem has to do outside of the TCP driver itself, I
really would not expect much contention.

- Regarding atomic lock-less lists, I do not know of any that support
*queues* as opposed to *stacks* (which is what your link points to).
Moreover, the list manipulation is associated with other sync'ed state
as well so making the lists lockfree does not really help as access to
other state information still has to be sync-ed.

Thanks again for taking the trouble to comment

/Ashok

On 6/30/2021 11:36 PM, David Gravereaux wrote:
> On 6/23/21 8:33 AM, Ashok wrote:
>> Thanks David. Nice to hear from one of the original Windows Tcl guys :-)
>
> I love your work and think it will be a great benefit for the community.
>
> One thing to watch out for... The main service thread that runs the
> loop on GetQueuedCompletetionStatus() is rather sensitive to thread
> synchronization.
>
> https://github.com/apnadkarni/iocp/blob/22fe8456e3b98f4186fc3eeda60739e73abfa686/win/tclWinIocpThread.c#L243
>
> You will get the best performance by avoiding any calls to
> criticalsection syncing. Please avoid them at all cost. Even consider
> special "atomic" linked list procedures. Maybe this could be a project
> goal for later?
>
> As an example: https://kukuruku.co/post/lock-free-stack-for-windows/
>

Re: ANNOUNCE: iocp 1.1.0

<sbq9ot$foo$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17405&group=comp.lang.tcl#17405

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: davygrvy@pobox.com (David Gravereaux)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Sat, 3 Jul 2021 11:20:11 -0700
Organization: Organized?! Are you kidding? NONE, it's anarchy!
Lines: 157
Message-ID: <sbq9ot$foo$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <sbibrj$43h$1@dont-email.me>
<sbjnp4$68v$1@dont-email.me>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="5pStNA0WKELnKJj7Z49Fd9Wd27092IKe4"
Injection-Date: Sat, 3 Jul 2021 18:20:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8f182dfe784bb4de3cee5cce51aa33c7";
logging-data="16152"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YuzGgWberOVFSVMMkog4sKK2BD1cD57w="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:uxFlveQA8MuphRdNoJgfPQfb0o4=
In-Reply-To: <sbjnp4$68v$1@dont-email.me>
 by: David Gravereaux - Sat, 3 Jul 2021 18:20 UTC
Attachments: "OpenPGP_signature" (application/pgp-signature)

On 6/30/21 11:36 PM, Ashok wrote:
> Hi David,
>
> Tx again for your interest and input. With respect to your suggestions,
> as a general comment I'll say I don't plan to spending any time on
> changes to iocp (except bug fixes of course) wrt the TCP component. It
> is fast enough (anywhere from 2-10 times faster than Tcl's socket for
> depending on traffic loads), stable and I have other fish (projects) to
> fry.

I concur 2-10 times faster, more robust, and lower resource usage. Have
your cake, eat it too. Complex code, yeah.

> - Regarding zero-byte copies - this is also suggested in the "Network
> Programmin for Windows" book (two decades old but still the reference
> for Winsock). I did implement this as a strawman but found no
> measureable difference in either throughput or CPU. My guess is that the
> reduced byte copies are offset by increased kernel transitions (one to
> post the zero byte and a second one to then read from the kernel). So
> added complexity for no measurable gain.

The gain regards lowering the per-socket resource usage of the non-paged
global memory pool. Good for a web server with many thousands of
concurrent connections I would think. I also had a user of iocpsock who
benefited from this when matching the SO_RCVBUF of the socket to the
channel buffer size. (IIRC)

If only for academic reasons, can we have the code do all the modes?

Here's a more detailed description of the memory limitation as it exists
in IOCPsock. If one runs this in a tclsh shell:

C:\WINNT\system32>tclsh84
% for {set i 0} {$i < 10000} {incr i} {socket2 localhost 80}
% foreach s [file channels] {if {[string match iocp* $s]} {close $s};
after 5}
% exit

With those 10,000 sockets connected (no data transfer), you'll see on
the tclhttpd status page that "General pool bytes in use" will be
1,800,516 bytes and "Special pool bytes in use" will be at 41,755,025 bytes.

Using a zero-byte receiving algorithm, and the 10,000 socket connection
script, I can lower the "Special pool bytes in use" to a mere 774,472
bytes. "Special pool" is the non-paged pool.

https://techcommunity.microsoft.com/t5/windows-blog-archive/pushing-the-limits-of-windows-paged-and-nonpaged-pool/ba-p/723789

> - Regarding critical sections / thread synchronization - I'm not sure if
> you noticed but the channel locking is based on SRWLocks, not critical
> sections unless you specifically compile for XP which does not support
> the former. Nevertheless, I would not think there is really a need to
> avoid critical sections either. Unless there is contention, they do not
> transition to the kernel (which is expensive) and contention is limited
> because there are at most two threads competing for a channel - the Tcl
> thread owning the channel and the iocp thread. Given how much work the
> Tcl channel subsystem has to do outside of the TCP driver itself, I
> really would not expect much contention.

Years back I did some profiling and found Tcl's event loop to poll event
sources ran at ~1,500 iterations per sec while the completion thread ran
at least ~3,500 per sec. So yes, more faster than Tcl could consume.

> - Regarding atomic lock-less lists, I do not know of any that support
> *queues* as opposed to *stacks* (which is what your link points to).
> Moreover, the list manipulation is associated with other sync'ed state
> as well so making the lists lockfree does not really help as access to
> other state information still has to be sync-ed.

I haven't done a deep read yet :) I have to setup a windows dev
environment so I can have some fun with your work. You see, this right
here is where I left off around 14 years ago. Let me have my fun.

https://docs.microsoft.com/en-us/windows/win32/sync/interlocked-singly-linked-lists

Yeah, that's incomplete. Off-hand, there's quite a few caveats about
using InterlockedCompare64Exchange128() directly. I think I'm starting
to remember why this was challenging.

Off-hand, there are only two "free-running" operations the completion
thread is essentially doing -- replacing completed AcceptEx calls to the
pool and growing the count of overlapped WSARecv calls if in a burst
condition given it is under the limit. Shaving a few uSec on those are,
I feel, worth the effort of profiling on a range of test conditions.

When it comes down to it, it isn't the normal case behavior but how the
use of IOCP responds to abuse for a DDoS attack that interests me.

...and then there's UDP and multicast.

...and all the other LSP types such as Bluetooth and irda. Who even
uses Netware anymore? Is it still even there in Windows 10? Appletalk?

...and other native HANDLE types that support overlapped I/O as a
complete overhaul of Tcl's I/O underpinnings on windows.

This is exciting. I gave up coding ages ago, even as a hobby. I'll
come out of retirement for this.

--
David Gravereaux
<davygrvy@pobox.com>

$ make war
make: *** No rule to make target `war'. Stop. Try `love' instead.

Attachments: "OpenPGP_signature" (application/pgp-signature)
Re: ANNOUNCE: iocp 1.1.0

<f62c47e0-812e-4b74-909f-87bf22b5e263n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19507&group=comp.lang.tcl#19507

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:189f:b0:304:eb5d:5ca1 with SMTP id v31-20020a05622a189f00b00304eb5d5ca1mr17258934qtc.396.1654776208134;
Thu, 09 Jun 2022 05:03:28 -0700 (PDT)
X-Received: by 2002:a05:6808:ed0:b0:2f9:c6f8:8b38 with SMTP id
q16-20020a0568080ed000b002f9c6f88b38mr1471956oiv.215.1654776207818; Thu, 09
Jun 2022 05:03:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 9 Jun 2022 05:03:27 -0700 (PDT)
In-Reply-To: <sbq9ot$foo$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=193.163.1.59; posting-account=yD4T_QoAAAAzNGigQobo9AtcgLgheZii
NNTP-Posting-Host: 193.163.1.59
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <sbibrj$43h$1@dont-email.me> <sbjnp4$68v$1@dont-email.me>
<sbq9ot$foo$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f62c47e0-812e-4b74-909f-87bf22b5e263n@googlegroups.com>
Subject: Re: ANNOUNCE: iocp 1.1.0
From: petro.kazmirchuk@gmail.com (Petro Kazmirchuk)
Injection-Date: Thu, 09 Jun 2022 12:03:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1579
 by: Petro Kazmirchuk - Thu, 9 Jun 2022 12:03 UTC

Ashok, thank you so much for this package!
I've just discovered iocp_inet, and it literally saved my project, where I need to receive simulated satellite data over TCP on Windows with rather high data rate (>600 Mbit/s split across 3 processes), and the standard Tcl [socket] was simply not fast enough.

Re: ANNOUNCE: iocp 1.1.0

<t80v1a$sjd$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19530&group=comp.lang.tcl#19530

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: palmtcl@yahoo.com (apn)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Sat, 11 Jun 2022 08:05:23 +0530
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <t80v1a$sjd$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <sbibrj$43h$1@dont-email.me>
<sbjnp4$68v$1@dont-email.me> <sbq9ot$foo$1@dont-email.me>
<f62c47e0-812e-4b74-909f-87bf22b5e263n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 11 Jun 2022 02:35:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="76ffd05f6fb6beb32c8c8e4ce58e4bc7";
logging-data="29293"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191Rg/yv9zGONKs0AkJqpvv"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:+oGwK19czdQ7vxebu2vuFeWZCNU=
In-Reply-To: <f62c47e0-812e-4b74-909f-87bf22b5e263n@googlegroups.com>
Content-Language: en-US
 by: apn - Sat, 11 Jun 2022 02:35 UTC

On 6/9/2022 5:33 PM, Petro Kazmirchuk wrote:
> Ashok, thank you so much for this package!
> I've just discovered iocp_inet, and it literally saved my project, where I need to receive simulated satellite data over TCP on Windows with rather high data rate (>600 Mbit/s split across 3 processes), and the standard Tcl [socket] was simply not fast enough.

yw. It's good to know of use in production as it is relatively new. At
some point, once it's been more battle tested in the real world, I'd
consider proposing it for the core. So thanks for letting me know.

/Ashok

Re: ANNOUNCE: iocp 1.1.0

<t826g1$tfc$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19531&group=comp.lang.tcl#19531

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wortkarg2@yahoo.de (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: ANNOUNCE: iocp 1.1.0
Date: Sat, 11 Jun 2022 15:48:51 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <t826g1$tfc$1@dont-email.me>
References: <sa6gjt$tlj$1@dont-email.me> <sauod4$m0k$1@dont-email.me>
<savk84$m20$3@dont-email.me> <sbibrj$43h$1@dont-email.me>
<sbjnp4$68v$1@dont-email.me> <sbq9ot$foo$1@dont-email.me>
<f62c47e0-812e-4b74-909f-87bf22b5e263n@googlegroups.com>
<t80v1a$sjd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 11 Jun 2022 13:48:49 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="cce106a8119fd7dad83329ac7206f1c2";
logging-data="30188"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xRAnFJyPHJmRUlCNBd+YG"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:i1j6zJWxyuPh3YJoOAGOE/DWaoM=
In-Reply-To: <t80v1a$sjd$1@dont-email.me>
Content-Language: en-GB
 by: Harald Oehlmann - Sat, 11 Jun 2022 13:48 UTC

Am 11.06.2022 um 04:35 schrieb apn:
> On 6/9/2022 5:33 PM, Petro Kazmirchuk wrote:
>> Ashok, thank you so much for this package!
>> I've just discovered iocp_inet, and it literally saved my project,
>> where I need to receive simulated satellite data over TCP on Windows
>> with rather high data rate (>600 Mbit/s split across 3 processes), and
>> the standard Tcl [socket] was simply not fast enough.
>
> yw. It's good to know of use in production as it is relatively new. At
> some point, once it's been more battle tested in the real world, I'd
> consider proposing it for the core. So thanks for letting me know.
>
> /Ashok

+1 for the core.

I use it everywhere and it is just great.

The Bluetooth part is also interesting, but is loosing power, as BTLE is
not supported. And modern barcode scanners use BTLE, which is also a
challenge on Android.

I am also in favour to put things into the core. So, it gets really
tested and there are more eyes on it.

Thank you and take care,
Harald

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor