peux-tu m'expliquer ce code janet: (def timeout 1) (def host "127.0.0.1") (def port…
Jump to turn (7)
- 1peux-tu m'expliquer ce code janet: (def timeout 1) (def host "127.0.0.1") (def p
- 2mais il n'y a pas d'octet envoyé ?
- 3pas de reception de données: repl:37:> (def timeout 1) 1 repl:38:> repl:39:> (de
- 4repl:1:> (def timeout 1) 1 repl:2:> repl:3:> (def host "127.0.0.1") "127.0.0.1"
- 5repl:41:> (thread repl:42:(> (def s (net/server host port)) repl:43:(> (var clie
- 6repl:139:> (try repl:140:(> (var client (net/accept s)) repl:141:(> (var buffer
- 7repl:156:> (defn server-thread [] repl:157:(> (def s (net/server host port)) rep
- User
peux-tu m'expliquer ce code janet: (def timeout 1)
(def host "127.0.0.1") (def port "9898")
#(def s (net/listen host port)) (def s (net/server host port))
(def c (net/connect host port))
(def buf @"") (var result :some-value)
(def start (os/time))
(try (set result (net/read c 1 buf timeout)) ([e] (eprintf "try failed with: %n" e)))
(if (= :some-value result) (printf "net/read did not return") (printf "net/read result is %n" result))
(printf "%.02f seconds" (- (os/time) start))
(net/close s)
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.