Hi!

We have some long running scripts, e.g. shrinking of large PDF files, and want to prevent reverse proxy and browser timeouts.

To achieve this, we are trying to periodically send small packages from the server to the browser while these scripts are running.

First we tried with ns_conn and ns_sockcallback

   set mychan [ns_conn channel]

   ns_sockcallback $mychan noop t 1

   proc noop {handle when} {
      # do something
   }

   ns_chan close $mychan

When we call this, we get the following error:

   error invalid when specification "t": should be one/more of r, w, e,
   or x

which contradicts the documentation of the command here:

https://naviserver.sourceforge.io/n/naviserver/files/ns_sockcallback.html

Then we tried something similiar with ns_connchan

set mychan [ns_connchan detach]

   ns_connchan callback -timeout 1 $mychan noop "r"

but a ns_connchan write $mychan throws the following error:

   ns_connchan: only binary channels are currently supported. Channel
   conn0 is not binary

Is there a solution to this problem?

regards,

Wolfgang


--

*Wolfgang Winkler*
Geschäftsführung
wolfgang.wink...@digital-concepts.com
mobil +43.699.19971172

dc:*büro*
digital concepts Novak Winkler OG
Software & Design
Landstraße 68, 5. Stock, 4020 Linz
www.digital-concepts.com <http://www.digital-concepts.com>
tel +43.732.997117.72
tel +43.699.1997117.2

Firmenbuchnummer: 192003h
Firmenbuchgericht: Landesgericht Linz


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to