Removed dependency ...
This commit is contained in:
parent
df80d7b007
commit
cd70bff6f5
@ -21,6 +21,7 @@ import javax.swing.Timer;
|
||||
|
||||
import org.jeromq.ZMQ;
|
||||
|
||||
|
||||
public class ZeroMQViewer implements PlugIn {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ZeroMQViewer.class.getName());
|
||||
@ -103,13 +104,14 @@ public class ZeroMQViewer implements PlugIn {
|
||||
logger.info("Connected to: tcp://"+hostname+":"+port);
|
||||
|
||||
while(collect){
|
||||
byte[] message = socket.recv();
|
||||
byte[] header = socket.recv();
|
||||
byte[] content = null;
|
||||
if (socket.hasReceiveMore()) {
|
||||
content = socket.recv();
|
||||
}
|
||||
logger.info(new String(message));
|
||||
updateImage(content);
|
||||
|
||||
readHeader(header);
|
||||
readContent(content);
|
||||
}
|
||||
|
||||
socket.close();
|
||||
@ -134,7 +136,12 @@ public class ZeroMQViewer implements PlugIn {
|
||||
}
|
||||
}
|
||||
|
||||
public void updateImage(byte[] content) {
|
||||
private void readHeader(byte[] header){
|
||||
String sheader = new String(header);
|
||||
logger.info(sheader);
|
||||
}
|
||||
|
||||
private void readContent(byte[] content) {
|
||||
try {
|
||||
if (img == null) {
|
||||
// TODO eventually use ByteProcessor or BinaryProcessor
|
||||
|
Loading…
x
Reference in New Issue
Block a user