co.resume();
};
};
selfresume.start();
Coroutine.yield();
PersistentArrayMap resp = new PersistentArrayMap(new Object[]{
RT.keyword(null, "status"), "200",
RT.keyword(null, "headers"), "",
RT.keyword(null, "body"), "Simple Response\n"
});
return resp;
}
};
Runnable runnable = new Runnable() {
@Override
public void run() throws SuspendExecution {
//{:uri "/simple", :scheme :http, :request-method :get, :headers {}}
PersistentArrayMap request = new PersistentArrayMap(new Object[] {
RT.keyword(null, "uri"), "/coroutineSocketAndCompojure/simple"
// RT.keyword(null, "uri"), "/simple"
,RT.keyword(null, "scheme"), RT.keyword(null, "http")
,RT.keyword(null, "request-method"), RT.keyword(null, "get")
,RT.keyword(null, "headers"), PersistentArrayMap.EMPTY