• tcllib httpd adapation with https/websockets

    From Sebastien Marchal@21:1/5 to All on Tue Feb 22 09:19:56 2022
    Hello All,

    I have been able to start a small tclib httpd server and got it to talk with a VUE browser UI. I must say this is not the esiest because httpd documentation is quite limited.
    Specifically, I am trying to see how to add more security with httpS, and some websocket feature. Does someone have an example somewhere ? Or something that explains a bit more how httpd works so that I can customize it ?

    Best regards,

    Sebastien.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Sebastien Marchal on Tue Feb 22 13:23:26 2022
    On 2/22/22 12:19 PM, Sebastien Marchal wrote:
    Hello All,

    I have been able to start a small tclib httpd server and got it to talk with a VUE browser UI. I must say this is not the esiest because httpd documentation is quite limited.
    Specifically, I am trying to see how to add more security with httpS, and some websocket feature. Does someone have an example somewhere ? Or something that explains a bit more how httpd works so that I can customize it ?

    Best regards,

    Sebastien.



    Hello,

    I don't have direct experience with it but I recently found this on the
    wiki. Hopefully you find it helpful. I would be interested in any improvements you make.


    Wiki: https://wiki.tcl-lang.org/page/CloudTk

    Here is a relevant snippet:


    # I made a few modifications to the Websocket library to make it work
    with TclHttpd.
    #
    # 1. In the procedure ::websocket::takeover changed the following
    line from
    # fconfigure $sock -translation binary -blocking on
    # to
    # fconfigure $sock -translation binary -blocking off
    #
    #
    # 2. In the procedure ::websocket::Receiver changed the following
    line from
    # binary scan $dta Iu mask
    # to
    # binary scan $dta I mask
    #
    # Without this change the intial handshake with the VNC or Telnet
    Server
    # was intermittent ie. did not connect.
    #
    # So make the above modifications and then save the following to
    # WebSocketTCP-gateway.tcl and drop in the custom directory.
    #

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nancy R. Hebert@21:1/5 to All on Tue Feb 22 12:23:37 2022
    https://www.reddit.com/r/JackassForeverMovie/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Wed Feb 23 08:05:53 2022
    Am 22.02.2022 um 18:19 schrieb Sebastien Marchal:
    Hello All,

    I have been able to start a small tclib httpd server and got it to talk with a VUE browser UI. I must say this is not the esiest because httpd documentation is quite limited.
    Specifically, I am trying to see how to add more security with httpS, and some websocket feature. Does someone have an example somewhere ? Or something that explains a bit more how httpd works so that I can customize it ?

    Best regards,

    Sebastien.

    Sebastien,

    the httpd server at tcllib is written by Sean Woods. It is a
    wizard-class piece of TCL software. Sean has given a couple of speaches
    on the clay oo framework, which is also used in here.

    I am personally often not in the situation to understand what Sean does
    and tend to use more simpler solutions.

    For my own needs, I checked this wiki page:

    https://wiki.tcl-lang.org/page/Web+servers+which+provide+native+Tcl+support

    and used the 3rd link for my projects.
    I am the maintainer of TCLWS and the contained standalone web server may
    also be used as a starting point. It features TLS and is IMHO relatively robust.

    I was also in the Rivet project, which features TCL for apache. This is
    great maintained software.

    Just my 2 pence,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sebastien Marchal@21:1/5 to All on Wed Feb 23 00:19:37 2022
    Le mercredi 23 février 2022 à 08:05:58 UTC+1, Harald Oehlmann a écrit :
    Am 22.02.2022 um 18:19 schrieb Sebastien Marchal:
    Hello All,

    I have been able to start a small tclib httpd server and got it to talk with a VUE browser UI. I must say this is not the esiest because httpd documentation is quite limited.
    Specifically, I am trying to see how to add more security with httpS, and some websocket feature. Does someone have an example somewhere ? Or something that explains a bit more how httpd works so that I can customize it ?

    Best regards,

    Sebastien.
    Sebastien,

    the httpd server at tcllib is written by Sean Woods. It is a
    wizard-class piece of TCL software. Sean has given a couple of speaches
    on the clay oo framework, which is also used in here.

    I am personally often not in the situation to understand what Sean does
    and tend to use more simpler solutions.

    For my own needs, I checked this wiki page:

    https://wiki.tcl-lang.org/page/Web+servers+which+provide+native+Tcl+support

    and used the 3rd link for my projects.
    I am the maintainer of TCLWS and the contained standalone web server may also be used as a starting point. It features TLS and is IMHO relatively robust.

    I was also in the Rivet project, which features TCL for apache. This is great maintained software.

    Just my 2 pence,
    Harald
    Thanks to all the answers ! I think I like this super minimal http server with ssl ... I will give it a try instead of the tcllib version.

    Yes I figured out the wizard level of httpd - and I am ok with advanced code - just a pitty the doc is not so clear because I managed to get it to work and the concept of a modern java based GUI for a tcl application makes sense. Unfortunatly I am coding
    'professionaly' and the result of this work, I will not be allowed to publish.

    Best regards,

    Sebastien.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)