File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
examples/src/aleph/examples Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 7
7
[compojure.route :as route]
8
8
[compojure.response :refer [Renderable]]
9
9
[aleph.http :as http]
10
- [byte-streams :as bs]
10
+ [clj-commons. byte-streams :as bs]
11
11
[manifold.stream :as s]
12
12
[manifold.deferred :as d]
13
13
[clojure.core.async :as a]
Original file line number Diff line number Diff line change 1
1
(ns aleph.examples.udp
2
2
(:require
3
- [manifold.deferred :as d]
4
3
[manifold.stream :as s]
5
4
[aleph.udp :as udp]
6
5
[clojure.string :as str]
7
- [byte-streams :as bs]))
6
+ [clj-commons. byte-streams :as bs]))
8
7
9
8
; ; Full documentation for the `aleph.udp` namespace can be found [here](http://aleph.io/codox/aleph/aleph.udp.html).
10
9
Original file line number Diff line number Diff line change 4
4
[ring.middleware.params :as params]
5
5
[compojure.route :as route]
6
6
[aleph.http :as http]
7
- [byte-streams :as bs]
8
7
[manifold.stream :as s]
9
8
[manifold.deferred :as d]
10
- [manifold.bus :as bus]
11
- [clojure.core.async :as a]))
9
+ [manifold.bus :as bus]))
12
10
13
11
(def non-websocket-request
14
12
{:status 400
111
109
112
110
; ; Here we create two clients, and have them speak to each other
113
111
(let [conn1 @(http/websocket-client " ws://localhost:10000/chat" )
114
- conn2 @(http/websocket-client " ws://localhost:10000/chat" )
115
- ]
112
+ conn2 @(http/websocket-client " ws://localhost:10000/chat" )]
113
+
116
114
117
115
; ; sign our two users in
118
116
(s/put-all! conn1 [" shoes and ships" " Alice" ])
126
124
(s/put! conn2 " hi!" )
127
125
128
126
@(s/take! conn1) ; => "Bob: hi!"
129
- @(s/take! conn2) ; => "Bob: hi!"
130
- )
127
+ @(s/take! conn2)) ; => "Bob: hi!"
128
+
131
129
132
130
(.close s)
You can’t perform that action at this time.
0 commit comments