Examples of destroySocket()


Examples of org.zeromq.ZContext.destroySocket()

                }
                else {
                    System.out.printf ("W: no response from server, failing over\n");

                    //  Old socket is confused; close it and open a new one
                    ctx.destroySocket(client);
                    serverNbr = (serverNbr + 1) % 2;
                    Thread.sleep(SETTLE_DELAY);
                    System.out.printf("I: connecting to server at %s...\n",
                            server[serverNbr]);
                    client = ctx.createSocket(ZMQ.REQ);
View Full Code Here

Examples of org.zeromq.ZContext.destroySocket()

                    e.printStackTrace();
                }

                if (interval < INTERVAL_MAX)
                    interval *= 2;
                ctx.destroySocket(worker);
                worker = worker_socket (ctx);
                liveness = HEARTBEAT_LIVENESS;
            }

            //  Send heartbeat to queue if it's time
View Full Code Here

Examples of org.zeromq.ZContext.destroySocket()

                    System.out.println("E: server seems to be offline, abandoning\n");
                    break;
                } else {
                    System.out.println("W: no response from server, retrying\n");
                    //  Old socket is confused; close it and open a new one
                    ctx.destroySocket(client);
                    System.out.println("I: reconnecting to server\n");
                    client = ctx.createSocket(ZMQ.REQ);
                    client.connect(SERVER_ENDPOINT);
                    //  Send request again, on new socket
                    client.send(request);
View Full Code Here

Examples of org.zeromq.ZContext.destroySocket()

                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                if (interval < INTERVAL_MAX)
                    interval *= 2;
                context.destroySocket(worker);
                worker = connectWorker(context);
                liveness = HEARTBEAT_LIVENESS;
            }
            // Send heartbeat to queue if it's time
            if (System.currentTimeMillis() > heartbeatAt) {
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.