Permalink
Browse files

new otp-send functions

  • Loading branch information...
1 parent 186c590 commit 1b2b840bd9dce5b254f163a06df0881556160297 @videlalvaro committed Aug 15, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/closerl/core.clj
View
10 src/closerl/core.clj
@@ -7,6 +7,7 @@
OtpConnection
;; Types
OtpErlangObject
+ OtpErlangPid
OtpErlangBoolean
OtpErlangAtom
OtpErlangBinary
@@ -79,6 +80,15 @@
"Registers the mbox name"
[#^OtpMbox mbox name]
(.registerName mbox name))
+
+(defn otp-send-to-pid
+ ([#^OtpMbox mbox #^OtpErlangPid pid #^OtpErlangObject msg]
+ (.send mbox pid msg)))
+(defn otp-send-to-name
+ ([#^OtpMbox mbox #^String name #^OtpErlangObject msg]
+ (.send mbox name msg))
+ ([#^OtpMbox mbox #^String name #^String node #^OtpErlangObject msg]
+ (.send mbox name msg)))
(defn otp-receive
"Receives a message. The process will block while waiting"

0 comments on commit 1b2b840

Please sign in to comment.