Skip to content
Permalink
dd80894f8c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (16 sloc) 898 Bytes
(ns de.mpg.shh.util-message-server.helpers
(:require [clojure.tools.logging :refer [info error]]
[clojure.core.async :as async]))
(defn synch-send
[request-channel host port username password address msg & {:keys [properties encoding timeout result-channel] :or {properties nil encoding :edn timeout 1000 result-channel (async/chan 1)}}]
(async/>!! request-channel {:msg msg
:properties properties
:encoding encoding
:command :send
:host host
:port port
:username username
:password password
:address address
:result-channel result-channel})
(first (async/alts!! [(async/timeout timeout) result-channel])))