require (scripted)
nsv_set shell_kernels $kernel [ns_time]
nsv_set shell_conn $kernel,channel $channel
if {![nsv_exists shell_conn $kernel,snapshot]} {
nsv_set -default shell_conn $kernel,snapshot ""
}
if {![namespace exists $kernel]} {
namespace eval $kernel {
proc ns_conn {args} {
set kernel [lindex [split [namespace current] ::] end]
if {[nsv_exists shell_conn "$kernel,$args"]} {
return [nsv_get shell_conn "$kernel,$args"]
} else {
return -code error "bad option \"$args\": must be acceptedcompression, auth, authpassword, authuser, contentfile, contentlength, contentsentlength, driver, files, flags, form, headers, host, id, isconnected, location, method, outputheaders, peeraddr, peerport, pool, port, protocol, query, partialtimes, request, server, sock, start, timeout, url, urlc, urlv, version, or zipaccepted"
}
}
::ws::snapshot::Snapshot create snapshot -namespace [namespace current]
}
namespace eval $kernel [nsv_get shell_conn $kernel,snapshot]
}