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)