[英]Getting Ping from Java to Erlang
I recently posted a similar Erlang-Java related question called " Java to Erlang Messages ". 我最近发布了一个类似的与Erlang-Java相关的问题,称为“ Java to Erlang Messages ”。
I have made some progress sense then, and i've gotten a stable connection up-and-running between the two languages (thanks to a older question that i found on stackoverflow). 那时我已经有了一些进步,并且我已经在两种语言之间建立了稳定的运行连接(由于我在stackoverflow上发现了一个更老的问题)。
But my problem is now that i can only send a message to Java from Erlang and receive it, Im having trouble making a return message. 但是我现在的问题是我只能从Erlang发送消息到Java并接收它,我在制作返回消息时遇到了麻烦。
What do i have to create in order to send a message from java, when can i send it? 我必须创建什么才能从Java发送消息,何时可以发送它?
This is some of my code for receiving. 这是我的一些接收代码。
try {
node = new OtpNode("javambox@localhost", "gui"); // name, cookie
} catch (IOException ex) {
System.exit(-1);
}
...
OtpMbox mbox = node.createMbox("mbox");
while (true) {
OtpErlangObject o = null;
try {
o = mbox.receive();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.