diff --git a/_posts/2013-02-05-http-kit-clean-small.md b/_posts/2013-02-05-http-kit-clean-small.md index d67d4ff..b5a8c02 100644 --- a/_posts/2013-02-05-http-kit-clean-small.md +++ b/_posts/2013-02-05-http-kit-clean-small.md @@ -6,9 +6,9 @@ status: publish title: http-kit is clean and small, less is exponentially more --- -* [HTTP server](http://http-kit.org/server.html): event-driven, ring adapter, websocket extension, asynchronous extension -* [HTTP Client](http://http-kit.org/client.html): event-driven, asynchronous with promise, synchronous with @promise, keep-alive -* [Timer facility](http://http-kit.org/timer.html) +* [HTTP server](http://http-kit.github.io/server.html): event-driven, ring adapter, websocket extension, asynchronous extension +* [HTTP Client](http://http-kit.github.io/client.html): event-driven, asynchronous with promise, synchronous with @promise, keep-alive +* [Timer facility](http://http-kit.github.io/timer.html) All the above + high concurrency + high performance + nice API + written from scrach = ~3K lines of code. @@ -35,3 +35,4 @@ Less is exponentially more *cloc runned time: Tue Feb 5 23:23:58 CST 2013, on master branch, from src directory* *Edit: 2013/3/29 with release 2.0.0, the codebase is slightly larger: 2970 lines of Java, 266 lines of Clojure* +*Edit: 2021/6/14: fix URLs* diff --git a/client.html b/client.html index aa79c3a..f04f034 100644 --- a/client.html +++ b/client.html @@ -57,7 +57,7 @@
Send request concurrently, with half the waiting time
{% highlight clojure %} -(let [resp1 (http/get "http://http-kit.org/") +(let [resp1 (http/get "http://http-kit.github.io/") resp2 (http/get "http://clojure.org/")] (println "Response 1's status: " (:status @resp1)) ; wait as necessary (println "Response 2's status: " (:status @resp2))) @@ -82,11 +82,11 @@keepalive option:
{% highlight clojure %}
; keepalive for 30s
-@(http/get "http://http-kit.org" {:keepalive 30000})
+@(http/get "http://http-kit.github.io" {:keepalive 30000})
; will reuse the previous TCP connection
-@(http/get "http://http-kit.org" {:keepalive 30000})
+@(http/get "http://http-kit.github.io" {:keepalive 30000})
; disable keepalive for this request
-@(http/get "http://http-kit.org" {:keepalive -1})
+@(http/get "http://http-kit.github.io" {:keepalive -1})
{% endhighlight %}