I am trying to build RCP server based on aleph. It passed on all the test, but when the byte array for send or receive become large, the bytes seems been corrupted.
For example. I tried to send a byte array which length is 2936, but I only got 1024 bytes at server
I followed the example and did my own modifications for nippy. The encoding and decoding will be done by handlers themselves.
(defn wrap-duplex-stream
  [s]
  (let [out (s/stream)]
    (s/connect out s)
    (s/splice out s)))
(defn client
  [host port]
  (d/chain (tcp/client {:host host, :port port})
           #(wrap-duplex-stream %)))
(defn start-server
  [handler port]
  (tcp/start-server
    (fn [s info]
      (handler (wrap-duplex-stream s) info))
    {:port port}))