Package org.zeromq.ZMQ

Examples of org.zeromq.ZMQ.Context.term()


            System.out.printf("I: normal request (%s)\n", request);
            Thread.sleep(1000);              //  Do some heavy work
            server.send(request);
        }
        server.close();
        context.term();
    }
}
View Full Code Here


            System.out.println("Received reply " + request_nbr + " [" + reply + "]");
        }
       
        //  We never get here but clean up anyhow
        requester.close();
        context.term();
    }
}
View Full Code Here

                    Thread.sleep (rand.nextInt (500) + 1);
                } catch (InterruptedException e) {
                }
            }
            worker.close();
            context.term();
        }
    }


    /**
 
View Full Code Here

        ZMQ.proxy (frontend, backend, null);

        //  We never get here but clean up anyhow
        frontend.close();
        backend.close();
        context.term();
    }
}
View Full Code Here

        publisher.send("END", 0);

        // clean up
        publisher.close();
        syncservice.close();
        context.term();
    }
}
View Full Code Here

        //  Run the proxy until the user interrupts us
        ZMQ.proxy (frontend, backend, null);

        frontend.close();
        backend.close();
        context.term();
    }
}
View Full Code Here

            }
        }

        frontend.close();
        backend.close();
        context.term();

    }

}
View Full Code Here

            client.send("HELLO");
            String reply = client.recvStr ();
            System.out.println("Client: " + reply);

            client.close();
            context.term();
        }
    }

    /**
     * While this example runs in a single process, that is just to make
View Full Code Here

                worker.sendMore (address);
                worker.sendMore ("");
                worker.send("OK");
            }
            worker.close ();
            context.term ();
        }
    }

    /**
     * This is the main task. It starts the clients and workers, and then
View Full Code Here

        //  Wait for signal
        receiver.recv(0);
        receiver.close ();
   
        System.out.println ("Test successful!");
        context.term ();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.