summaryrefslogtreecommitdiff
path: root/java/org
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-14 11:25:57 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-14 11:25:57 +0200
commitc806aabb2d3e6b1ba9e3f61319f23d45c7f9a007 (patch)
treefb44aa2fba39f972b5d04eba7cda7dc310d4b188 /java/org
parent36707529a7d82b164b59d42fe0d5d8a35c3dd279 (diff)
java binding sets socket options using setsockopt function
Diffstat (limited to 'java/org')
-rw-r--r--java/org/zmq/Socket.java58
1 files changed, 15 insertions, 43 deletions
diff --git a/java/org/zmq/Socket.java b/java/org/zmq/Socket.java
index 4c6a3d3..0d96c71 100644
--- a/java/org/zmq/Socket.java
+++ b/java/org/zmq/Socket.java
@@ -27,19 +27,24 @@ public class Socket
}
public static final int NOBLOCK = 1;
-
public static final int NOFLUSH = 2;
public static final int P2P = 0;
-
public static final int PUB = 1;
-
public static final int SUB = 2;
-
public static final int REQ = 3;
-
public static final int REP = 4;
+ public static final int HWM = 1;
+ public static final int LWM = 2;
+ public static final int SWAP = 3;
+ public static final int AFFINITY = 4;
+ public static final int IDENTITY = 5;
+ public static final int SUBSCRIBE = 6;
+ public static final int UNSUBSCRIBE = 7;
+ public static final int RATE = 8;
+ public static final int RECOVERY_IVL = 9;
+
/**
* Class constructor.
*
@@ -51,46 +56,13 @@ public class Socket
}
/**
- * Set the high watermark on the socket.
- *
- * @param hwm high watermark.
- */
- public native void setHwm (long hwm);
-
- /**
- * Set the low watermark on the socket.
- *
- * @param lwm low watermark.
- */
- public native void setLwm (long lwm);
-
- /**
- * Set swap size.
- *
- * @param swap_size swap size.
- */
- public native void setSwap (long swap_size);
-
- /**
- * Set reception mask.
- *
- * @param mask mask.
- */
- public native void setMask (long mask);
-
- /**
- * Set affinity.
- *
- * @param affinity
- */
- public native void setAffinity (long affinity);
-
- /**
- * Set identity.
+ * Set the socket option value.
*
- * @param identity
+ * @param option ID of the option to set
+ * @param optval value to set the option to
*/
- public native void setIdentity (String identity);
+ public native void setsockopt (int option, long optval);
+ public native void setsockopt (int option, String optval);
/**
* Bind to network interface. Start listening for new connections.