Skip to content

Commit

Permalink
Merge pull request #11 from trevorbernard/master
Browse files Browse the repository at this point in the history
Make jyre compatible with JeroMQ and JZMQ
  • Loading branch information
hintjens committed Sep 3, 2015
2 parents 9aaf0e3 + 5964124 commit 7683726
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions src/main/java/org/zyre/ZreInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,13 @@

package org.zyre;

import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;

/*
import org.filemq.FmqClient;
import org.filemq.FmqDir;
import org.filemq.FmqFile;
import org.filemq.FmqServer;
*/
import org.zeromq.ZContext;
import org.zeromq.ZFrame;
import org.zeromq.ZMQ;
Expand Down Expand Up @@ -479,7 +472,7 @@ protected boolean recvFromPeer ()
ZFrame cookie = msg.content ();
pipe.sendMore ("WHISPER");
pipe.sendMore (identity);
cookie.sendAndKeep (pipe); // let msg free the frame
cookie.send (pipe, 0); // let msg free the frame
}
else
if (msg.id () == ZreMsg.SHOUT) {
Expand All @@ -488,7 +481,7 @@ protected boolean recvFromPeer ()
pipe.sendMore ("SHOUT");
pipe.sendMore (identity);
pipe.sendMore (msg.group ());
cookie.sendAndKeep (pipe); // let msg free the frame
cookie.send (pipe, 0); // let msg free the frame
}
else
if (msg.id () == ZreMsg.PING) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/zyre/ZreLogMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public boolean send (Socket socket)
}
}
// Now send the data frame
if (!frame.sendAndDestroy (socket, frameFlags)) {
if (!frame.send (socket, frameFlags)) {
frame.destroy ();
destroy ();
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/zyre/ZreMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ public boolean send (Socket socket)
}
}
// Now send the data frame
if (!frame.sendAndDestroy (socket, frameFlags)) {
if (!frame.send (socket, frameFlags)) {
frame.destroy ();
destroy ();
return false;
Expand Down

0 comments on commit 7683726

Please sign in to comment.