czmq-ffi-gen 0.16.1 → 1.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/README.md +4 -18
- data/lib/czmq-ffi-gen/czmq/ffi/version.rb +1 -1
- data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +10 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +17 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +16 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zosc.rb +487 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +593 -0
- data/lib/czmq-ffi-gen/czmq/ffi/zsys.rb +72 -1
- data/lib/czmq-ffi-gen/czmq/ffi.rb +64 -0
- data/lib/czmq-ffi-gen/gem_version.rb +1 -1
- data/lib/czmq-ffi-gen/versions.rb +0 -3
- metadata +15 -25
@@ -233,6 +233,22 @@ module CZMQ
|
|
233
233
|
__new ptr
|
234
234
|
end
|
235
235
|
|
236
|
+
# Create a DGRAM (UDP) socket. Default action is bind.
|
237
|
+
# The endpoint is a string consisting of a
|
238
|
+
# 'transport'`://` followed by an 'address'. As this is
|
239
|
+
# a UDP socket the 'transport' has to be 'udp'. The
|
240
|
+
# 'address' specifies the ip address and port to
|
241
|
+
# bind to. For example: udp://127.0.0.1:1234
|
242
|
+
# Note: To send to an endpoint over UDP you have to
|
243
|
+
# send a message with the destination endpoint address
|
244
|
+
# as a first message!
|
245
|
+
# @param endpoint [String, #to_s, nil]
|
246
|
+
# @return [CZMQ::Zsock]
|
247
|
+
def self.new_dgram(endpoint)
|
248
|
+
ptr = ::CZMQ::FFI.zsock_new_dgram(endpoint)
|
249
|
+
__new ptr
|
250
|
+
end
|
251
|
+
|
236
252
|
# Destroy the socket. You must use this for any socket created via the
|
237
253
|
# zsock_new method.
|
238
254
|
#
|
@@ -941,6 +957,583 @@ module CZMQ
|
|
941
957
|
result
|
942
958
|
end
|
943
959
|
|
960
|
+
# Get socket option `priority`.
|
961
|
+
# Available from libzmq 4.3.0.
|
962
|
+
#
|
963
|
+
# @return [Integer]
|
964
|
+
def priority()
|
965
|
+
raise DestroyedError unless @ptr
|
966
|
+
self_p = @ptr
|
967
|
+
result = ::CZMQ::FFI.zsock_priority(self_p)
|
968
|
+
result
|
969
|
+
end
|
970
|
+
|
971
|
+
# Get socket option `priority`.
|
972
|
+
# Available from libzmq 4.3.0.
|
973
|
+
#
|
974
|
+
# This is the polymorphic version of #priority.
|
975
|
+
#
|
976
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
977
|
+
# object reference to use this method on
|
978
|
+
# @return [Integer]
|
979
|
+
def self.priority(self_p)
|
980
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
981
|
+
result = ::CZMQ::FFI.zsock_priority(self_p)
|
982
|
+
result
|
983
|
+
end
|
984
|
+
|
985
|
+
# Set socket option `priority`.
|
986
|
+
# Available from libzmq 4.3.0.
|
987
|
+
#
|
988
|
+
# @param priority [Integer, #to_int, #to_i]
|
989
|
+
# @return [void]
|
990
|
+
def set_priority(priority)
|
991
|
+
raise DestroyedError unless @ptr
|
992
|
+
self_p = @ptr
|
993
|
+
priority = Integer(priority)
|
994
|
+
result = ::CZMQ::FFI.zsock_set_priority(self_p, priority)
|
995
|
+
result
|
996
|
+
end
|
997
|
+
|
998
|
+
# Set socket option `priority`.
|
999
|
+
# Available from libzmq 4.3.0.
|
1000
|
+
#
|
1001
|
+
# This is the polymorphic version of #set_priority.
|
1002
|
+
#
|
1003
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1004
|
+
# object reference to use this method on
|
1005
|
+
# @param priority [Integer, #to_int, #to_i]
|
1006
|
+
# @return [void]
|
1007
|
+
def self.set_priority(self_p, priority)
|
1008
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1009
|
+
priority = Integer(priority)
|
1010
|
+
result = ::CZMQ::FFI.zsock_set_priority(self_p, priority)
|
1011
|
+
result
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# Get socket option `reconnect_stop`.
|
1015
|
+
# Available from libzmq 4.3.0.
|
1016
|
+
#
|
1017
|
+
# @return [Integer]
|
1018
|
+
def reconnect_stop()
|
1019
|
+
raise DestroyedError unless @ptr
|
1020
|
+
self_p = @ptr
|
1021
|
+
result = ::CZMQ::FFI.zsock_reconnect_stop(self_p)
|
1022
|
+
result
|
1023
|
+
end
|
1024
|
+
|
1025
|
+
# Get socket option `reconnect_stop`.
|
1026
|
+
# Available from libzmq 4.3.0.
|
1027
|
+
#
|
1028
|
+
# This is the polymorphic version of #reconnect_stop.
|
1029
|
+
#
|
1030
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1031
|
+
# object reference to use this method on
|
1032
|
+
# @return [Integer]
|
1033
|
+
def self.reconnect_stop(self_p)
|
1034
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1035
|
+
result = ::CZMQ::FFI.zsock_reconnect_stop(self_p)
|
1036
|
+
result
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
# Set socket option `reconnect_stop`.
|
1040
|
+
# Available from libzmq 4.3.0.
|
1041
|
+
#
|
1042
|
+
# @param reconnect_stop [Integer, #to_int, #to_i]
|
1043
|
+
# @return [void]
|
1044
|
+
def set_reconnect_stop(reconnect_stop)
|
1045
|
+
raise DestroyedError unless @ptr
|
1046
|
+
self_p = @ptr
|
1047
|
+
reconnect_stop = Integer(reconnect_stop)
|
1048
|
+
result = ::CZMQ::FFI.zsock_set_reconnect_stop(self_p, reconnect_stop)
|
1049
|
+
result
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Set socket option `reconnect_stop`.
|
1053
|
+
# Available from libzmq 4.3.0.
|
1054
|
+
#
|
1055
|
+
# This is the polymorphic version of #set_reconnect_stop.
|
1056
|
+
#
|
1057
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1058
|
+
# object reference to use this method on
|
1059
|
+
# @param reconnect_stop [Integer, #to_int, #to_i]
|
1060
|
+
# @return [void]
|
1061
|
+
def self.set_reconnect_stop(self_p, reconnect_stop)
|
1062
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1063
|
+
reconnect_stop = Integer(reconnect_stop)
|
1064
|
+
result = ::CZMQ::FFI.zsock_set_reconnect_stop(self_p, reconnect_stop)
|
1065
|
+
result
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
# Set socket option `only_first_subscribe`.
|
1069
|
+
# Available from libzmq 4.3.0.
|
1070
|
+
#
|
1071
|
+
# @param only_first_subscribe [Integer, #to_int, #to_i]
|
1072
|
+
# @return [void]
|
1073
|
+
def set_only_first_subscribe(only_first_subscribe)
|
1074
|
+
raise DestroyedError unless @ptr
|
1075
|
+
self_p = @ptr
|
1076
|
+
only_first_subscribe = Integer(only_first_subscribe)
|
1077
|
+
result = ::CZMQ::FFI.zsock_set_only_first_subscribe(self_p, only_first_subscribe)
|
1078
|
+
result
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Set socket option `only_first_subscribe`.
|
1082
|
+
# Available from libzmq 4.3.0.
|
1083
|
+
#
|
1084
|
+
# This is the polymorphic version of #set_only_first_subscribe.
|
1085
|
+
#
|
1086
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1087
|
+
# object reference to use this method on
|
1088
|
+
# @param only_first_subscribe [Integer, #to_int, #to_i]
|
1089
|
+
# @return [void]
|
1090
|
+
def self.set_only_first_subscribe(self_p, only_first_subscribe)
|
1091
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1092
|
+
only_first_subscribe = Integer(only_first_subscribe)
|
1093
|
+
result = ::CZMQ::FFI.zsock_set_only_first_subscribe(self_p, only_first_subscribe)
|
1094
|
+
result
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# Set socket option `hello_msg`.
|
1098
|
+
# Available from libzmq 4.3.0.
|
1099
|
+
#
|
1100
|
+
# @param hello_msg [Zframe, #__ptr]
|
1101
|
+
# @return [void]
|
1102
|
+
def set_hello_msg(hello_msg)
|
1103
|
+
raise DestroyedError unless @ptr
|
1104
|
+
self_p = @ptr
|
1105
|
+
hello_msg = hello_msg.__ptr if hello_msg
|
1106
|
+
result = ::CZMQ::FFI.zsock_set_hello_msg(self_p, hello_msg)
|
1107
|
+
result
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
# Set socket option `hello_msg`.
|
1111
|
+
# Available from libzmq 4.3.0.
|
1112
|
+
#
|
1113
|
+
# This is the polymorphic version of #set_hello_msg.
|
1114
|
+
#
|
1115
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1116
|
+
# object reference to use this method on
|
1117
|
+
# @param hello_msg [Zframe, #__ptr]
|
1118
|
+
# @return [void]
|
1119
|
+
def self.set_hello_msg(self_p, hello_msg)
|
1120
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1121
|
+
hello_msg = hello_msg.__ptr if hello_msg
|
1122
|
+
result = ::CZMQ::FFI.zsock_set_hello_msg(self_p, hello_msg)
|
1123
|
+
result
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
# Set socket option `disconnect_msg`.
|
1127
|
+
# Available from libzmq 4.3.0.
|
1128
|
+
#
|
1129
|
+
# @param disconnect_msg [Zframe, #__ptr]
|
1130
|
+
# @return [void]
|
1131
|
+
def set_disconnect_msg(disconnect_msg)
|
1132
|
+
raise DestroyedError unless @ptr
|
1133
|
+
self_p = @ptr
|
1134
|
+
disconnect_msg = disconnect_msg.__ptr if disconnect_msg
|
1135
|
+
result = ::CZMQ::FFI.zsock_set_disconnect_msg(self_p, disconnect_msg)
|
1136
|
+
result
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
# Set socket option `disconnect_msg`.
|
1140
|
+
# Available from libzmq 4.3.0.
|
1141
|
+
#
|
1142
|
+
# This is the polymorphic version of #set_disconnect_msg.
|
1143
|
+
#
|
1144
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1145
|
+
# object reference to use this method on
|
1146
|
+
# @param disconnect_msg [Zframe, #__ptr]
|
1147
|
+
# @return [void]
|
1148
|
+
def self.set_disconnect_msg(self_p, disconnect_msg)
|
1149
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1150
|
+
disconnect_msg = disconnect_msg.__ptr if disconnect_msg
|
1151
|
+
result = ::CZMQ::FFI.zsock_set_disconnect_msg(self_p, disconnect_msg)
|
1152
|
+
result
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
# Set socket option `wss_trust_system`.
|
1156
|
+
# Available from libzmq 4.3.0.
|
1157
|
+
#
|
1158
|
+
# @param wss_trust_system [Integer, #to_int, #to_i]
|
1159
|
+
# @return [void]
|
1160
|
+
def set_wss_trust_system(wss_trust_system)
|
1161
|
+
raise DestroyedError unless @ptr
|
1162
|
+
self_p = @ptr
|
1163
|
+
wss_trust_system = Integer(wss_trust_system)
|
1164
|
+
result = ::CZMQ::FFI.zsock_set_wss_trust_system(self_p, wss_trust_system)
|
1165
|
+
result
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
# Set socket option `wss_trust_system`.
|
1169
|
+
# Available from libzmq 4.3.0.
|
1170
|
+
#
|
1171
|
+
# This is the polymorphic version of #set_wss_trust_system.
|
1172
|
+
#
|
1173
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1174
|
+
# object reference to use this method on
|
1175
|
+
# @param wss_trust_system [Integer, #to_int, #to_i]
|
1176
|
+
# @return [void]
|
1177
|
+
def self.set_wss_trust_system(self_p, wss_trust_system)
|
1178
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1179
|
+
wss_trust_system = Integer(wss_trust_system)
|
1180
|
+
result = ::CZMQ::FFI.zsock_set_wss_trust_system(self_p, wss_trust_system)
|
1181
|
+
result
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
# Set socket option `wss_hostname`.
|
1185
|
+
# Available from libzmq 4.3.0.
|
1186
|
+
#
|
1187
|
+
# @param wss_hostname [String, #to_s, nil]
|
1188
|
+
# @return [void]
|
1189
|
+
def set_wss_hostname(wss_hostname)
|
1190
|
+
raise DestroyedError unless @ptr
|
1191
|
+
self_p = @ptr
|
1192
|
+
result = ::CZMQ::FFI.zsock_set_wss_hostname(self_p, wss_hostname)
|
1193
|
+
result
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# Set socket option `wss_hostname`.
|
1197
|
+
# Available from libzmq 4.3.0.
|
1198
|
+
#
|
1199
|
+
# This is the polymorphic version of #set_wss_hostname.
|
1200
|
+
#
|
1201
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1202
|
+
# object reference to use this method on
|
1203
|
+
# @param wss_hostname [String, #to_s, nil]
|
1204
|
+
# @return [void]
|
1205
|
+
def self.set_wss_hostname(self_p, wss_hostname)
|
1206
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1207
|
+
result = ::CZMQ::FFI.zsock_set_wss_hostname(self_p, wss_hostname)
|
1208
|
+
result
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
# Set socket option `wss_trust_pem`.
|
1212
|
+
# Available from libzmq 4.3.0.
|
1213
|
+
#
|
1214
|
+
# @param wss_trust_pem [String, #to_s, nil]
|
1215
|
+
# @return [void]
|
1216
|
+
def set_wss_trust_pem(wss_trust_pem)
|
1217
|
+
raise DestroyedError unless @ptr
|
1218
|
+
self_p = @ptr
|
1219
|
+
result = ::CZMQ::FFI.zsock_set_wss_trust_pem(self_p, wss_trust_pem)
|
1220
|
+
result
|
1221
|
+
end
|
1222
|
+
|
1223
|
+
# Set socket option `wss_trust_pem`.
|
1224
|
+
# Available from libzmq 4.3.0.
|
1225
|
+
#
|
1226
|
+
# This is the polymorphic version of #set_wss_trust_pem.
|
1227
|
+
#
|
1228
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1229
|
+
# object reference to use this method on
|
1230
|
+
# @param wss_trust_pem [String, #to_s, nil]
|
1231
|
+
# @return [void]
|
1232
|
+
def self.set_wss_trust_pem(self_p, wss_trust_pem)
|
1233
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1234
|
+
result = ::CZMQ::FFI.zsock_set_wss_trust_pem(self_p, wss_trust_pem)
|
1235
|
+
result
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
# Set socket option `wss_cert_pem`.
|
1239
|
+
# Available from libzmq 4.3.0.
|
1240
|
+
#
|
1241
|
+
# @param wss_cert_pem [String, #to_s, nil]
|
1242
|
+
# @return [void]
|
1243
|
+
def set_wss_cert_pem(wss_cert_pem)
|
1244
|
+
raise DestroyedError unless @ptr
|
1245
|
+
self_p = @ptr
|
1246
|
+
result = ::CZMQ::FFI.zsock_set_wss_cert_pem(self_p, wss_cert_pem)
|
1247
|
+
result
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
# Set socket option `wss_cert_pem`.
|
1251
|
+
# Available from libzmq 4.3.0.
|
1252
|
+
#
|
1253
|
+
# This is the polymorphic version of #set_wss_cert_pem.
|
1254
|
+
#
|
1255
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1256
|
+
# object reference to use this method on
|
1257
|
+
# @param wss_cert_pem [String, #to_s, nil]
|
1258
|
+
# @return [void]
|
1259
|
+
def self.set_wss_cert_pem(self_p, wss_cert_pem)
|
1260
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1261
|
+
result = ::CZMQ::FFI.zsock_set_wss_cert_pem(self_p, wss_cert_pem)
|
1262
|
+
result
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
# Set socket option `wss_key_pem`.
|
1266
|
+
# Available from libzmq 4.3.0.
|
1267
|
+
#
|
1268
|
+
# @param wss_key_pem [String, #to_s, nil]
|
1269
|
+
# @return [void]
|
1270
|
+
def set_wss_key_pem(wss_key_pem)
|
1271
|
+
raise DestroyedError unless @ptr
|
1272
|
+
self_p = @ptr
|
1273
|
+
result = ::CZMQ::FFI.zsock_set_wss_key_pem(self_p, wss_key_pem)
|
1274
|
+
result
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
# Set socket option `wss_key_pem`.
|
1278
|
+
# Available from libzmq 4.3.0.
|
1279
|
+
#
|
1280
|
+
# This is the polymorphic version of #set_wss_key_pem.
|
1281
|
+
#
|
1282
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1283
|
+
# object reference to use this method on
|
1284
|
+
# @param wss_key_pem [String, #to_s, nil]
|
1285
|
+
# @return [void]
|
1286
|
+
def self.set_wss_key_pem(self_p, wss_key_pem)
|
1287
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1288
|
+
result = ::CZMQ::FFI.zsock_set_wss_key_pem(self_p, wss_key_pem)
|
1289
|
+
result
|
1290
|
+
end
|
1291
|
+
|
1292
|
+
# Get socket option `out_batch_size`.
|
1293
|
+
# Available from libzmq 4.3.0.
|
1294
|
+
#
|
1295
|
+
# @return [Integer]
|
1296
|
+
def out_batch_size()
|
1297
|
+
raise DestroyedError unless @ptr
|
1298
|
+
self_p = @ptr
|
1299
|
+
result = ::CZMQ::FFI.zsock_out_batch_size(self_p)
|
1300
|
+
result
|
1301
|
+
end
|
1302
|
+
|
1303
|
+
# Get socket option `out_batch_size`.
|
1304
|
+
# Available from libzmq 4.3.0.
|
1305
|
+
#
|
1306
|
+
# This is the polymorphic version of #out_batch_size.
|
1307
|
+
#
|
1308
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1309
|
+
# object reference to use this method on
|
1310
|
+
# @return [Integer]
|
1311
|
+
def self.out_batch_size(self_p)
|
1312
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1313
|
+
result = ::CZMQ::FFI.zsock_out_batch_size(self_p)
|
1314
|
+
result
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
# Set socket option `out_batch_size`.
|
1318
|
+
# Available from libzmq 4.3.0.
|
1319
|
+
#
|
1320
|
+
# @param out_batch_size [Integer, #to_int, #to_i]
|
1321
|
+
# @return [void]
|
1322
|
+
def set_out_batch_size(out_batch_size)
|
1323
|
+
raise DestroyedError unless @ptr
|
1324
|
+
self_p = @ptr
|
1325
|
+
out_batch_size = Integer(out_batch_size)
|
1326
|
+
result = ::CZMQ::FFI.zsock_set_out_batch_size(self_p, out_batch_size)
|
1327
|
+
result
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
# Set socket option `out_batch_size`.
|
1331
|
+
# Available from libzmq 4.3.0.
|
1332
|
+
#
|
1333
|
+
# This is the polymorphic version of #set_out_batch_size.
|
1334
|
+
#
|
1335
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1336
|
+
# object reference to use this method on
|
1337
|
+
# @param out_batch_size [Integer, #to_int, #to_i]
|
1338
|
+
# @return [void]
|
1339
|
+
def self.set_out_batch_size(self_p, out_batch_size)
|
1340
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1341
|
+
out_batch_size = Integer(out_batch_size)
|
1342
|
+
result = ::CZMQ::FFI.zsock_set_out_batch_size(self_p, out_batch_size)
|
1343
|
+
result
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
# Get socket option `in_batch_size`.
|
1347
|
+
# Available from libzmq 4.3.0.
|
1348
|
+
#
|
1349
|
+
# @return [Integer]
|
1350
|
+
def in_batch_size()
|
1351
|
+
raise DestroyedError unless @ptr
|
1352
|
+
self_p = @ptr
|
1353
|
+
result = ::CZMQ::FFI.zsock_in_batch_size(self_p)
|
1354
|
+
result
|
1355
|
+
end
|
1356
|
+
|
1357
|
+
# Get socket option `in_batch_size`.
|
1358
|
+
# Available from libzmq 4.3.0.
|
1359
|
+
#
|
1360
|
+
# This is the polymorphic version of #in_batch_size.
|
1361
|
+
#
|
1362
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1363
|
+
# object reference to use this method on
|
1364
|
+
# @return [Integer]
|
1365
|
+
def self.in_batch_size(self_p)
|
1366
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1367
|
+
result = ::CZMQ::FFI.zsock_in_batch_size(self_p)
|
1368
|
+
result
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
# Set socket option `in_batch_size`.
|
1372
|
+
# Available from libzmq 4.3.0.
|
1373
|
+
#
|
1374
|
+
# @param in_batch_size [Integer, #to_int, #to_i]
|
1375
|
+
# @return [void]
|
1376
|
+
def set_in_batch_size(in_batch_size)
|
1377
|
+
raise DestroyedError unless @ptr
|
1378
|
+
self_p = @ptr
|
1379
|
+
in_batch_size = Integer(in_batch_size)
|
1380
|
+
result = ::CZMQ::FFI.zsock_set_in_batch_size(self_p, in_batch_size)
|
1381
|
+
result
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
# Set socket option `in_batch_size`.
|
1385
|
+
# Available from libzmq 4.3.0.
|
1386
|
+
#
|
1387
|
+
# This is the polymorphic version of #set_in_batch_size.
|
1388
|
+
#
|
1389
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1390
|
+
# object reference to use this method on
|
1391
|
+
# @param in_batch_size [Integer, #to_int, #to_i]
|
1392
|
+
# @return [void]
|
1393
|
+
def self.set_in_batch_size(self_p, in_batch_size)
|
1394
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1395
|
+
in_batch_size = Integer(in_batch_size)
|
1396
|
+
result = ::CZMQ::FFI.zsock_set_in_batch_size(self_p, in_batch_size)
|
1397
|
+
result
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
# Get socket option `socks_password`.
|
1401
|
+
# Available from libzmq 4.3.0.
|
1402
|
+
#
|
1403
|
+
# @return [::FFI::AutoPointer]
|
1404
|
+
def socks_password()
|
1405
|
+
raise DestroyedError unless @ptr
|
1406
|
+
self_p = @ptr
|
1407
|
+
result = ::CZMQ::FFI.zsock_socks_password(self_p)
|
1408
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
1409
|
+
result
|
1410
|
+
end
|
1411
|
+
|
1412
|
+
# Get socket option `socks_password`.
|
1413
|
+
# Available from libzmq 4.3.0.
|
1414
|
+
#
|
1415
|
+
# This is the polymorphic version of #socks_password.
|
1416
|
+
#
|
1417
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1418
|
+
# object reference to use this method on
|
1419
|
+
# @return [::FFI::AutoPointer]
|
1420
|
+
def self.socks_password(self_p)
|
1421
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1422
|
+
result = ::CZMQ::FFI.zsock_socks_password(self_p)
|
1423
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
1424
|
+
result
|
1425
|
+
end
|
1426
|
+
|
1427
|
+
# Set socket option `socks_password`.
|
1428
|
+
# Available from libzmq 4.3.0.
|
1429
|
+
#
|
1430
|
+
# @param socks_password [String, #to_s, nil]
|
1431
|
+
# @return [void]
|
1432
|
+
def set_socks_password(socks_password)
|
1433
|
+
raise DestroyedError unless @ptr
|
1434
|
+
self_p = @ptr
|
1435
|
+
result = ::CZMQ::FFI.zsock_set_socks_password(self_p, socks_password)
|
1436
|
+
result
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
# Set socket option `socks_password`.
|
1440
|
+
# Available from libzmq 4.3.0.
|
1441
|
+
#
|
1442
|
+
# This is the polymorphic version of #set_socks_password.
|
1443
|
+
#
|
1444
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1445
|
+
# object reference to use this method on
|
1446
|
+
# @param socks_password [String, #to_s, nil]
|
1447
|
+
# @return [void]
|
1448
|
+
def self.set_socks_password(self_p, socks_password)
|
1449
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1450
|
+
result = ::CZMQ::FFI.zsock_set_socks_password(self_p, socks_password)
|
1451
|
+
result
|
1452
|
+
end
|
1453
|
+
|
1454
|
+
# Get socket option `socks_username`.
|
1455
|
+
# Available from libzmq 4.3.0.
|
1456
|
+
#
|
1457
|
+
# @return [::FFI::AutoPointer]
|
1458
|
+
def socks_username()
|
1459
|
+
raise DestroyedError unless @ptr
|
1460
|
+
self_p = @ptr
|
1461
|
+
result = ::CZMQ::FFI.zsock_socks_username(self_p)
|
1462
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
1463
|
+
result
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
# Get socket option `socks_username`.
|
1467
|
+
# Available from libzmq 4.3.0.
|
1468
|
+
#
|
1469
|
+
# This is the polymorphic version of #socks_username.
|
1470
|
+
#
|
1471
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1472
|
+
# object reference to use this method on
|
1473
|
+
# @return [::FFI::AutoPointer]
|
1474
|
+
def self.socks_username(self_p)
|
1475
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1476
|
+
result = ::CZMQ::FFI.zsock_socks_username(self_p)
|
1477
|
+
result = ::FFI::AutoPointer.new(result, LibC.method(:free))
|
1478
|
+
result
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
# Set socket option `socks_username`.
|
1482
|
+
# Available from libzmq 4.3.0.
|
1483
|
+
#
|
1484
|
+
# @param socks_username [String, #to_s, nil]
|
1485
|
+
# @return [void]
|
1486
|
+
def set_socks_username(socks_username)
|
1487
|
+
raise DestroyedError unless @ptr
|
1488
|
+
self_p = @ptr
|
1489
|
+
result = ::CZMQ::FFI.zsock_set_socks_username(self_p, socks_username)
|
1490
|
+
result
|
1491
|
+
end
|
1492
|
+
|
1493
|
+
# Set socket option `socks_username`.
|
1494
|
+
# Available from libzmq 4.3.0.
|
1495
|
+
#
|
1496
|
+
# This is the polymorphic version of #set_socks_username.
|
1497
|
+
#
|
1498
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1499
|
+
# object reference to use this method on
|
1500
|
+
# @param socks_username [String, #to_s, nil]
|
1501
|
+
# @return [void]
|
1502
|
+
def self.set_socks_username(self_p, socks_username)
|
1503
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1504
|
+
result = ::CZMQ::FFI.zsock_set_socks_username(self_p, socks_username)
|
1505
|
+
result
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
# Set socket option `xpub_manual_last_value`.
|
1509
|
+
# Available from libzmq 4.3.0.
|
1510
|
+
#
|
1511
|
+
# @param xpub_manual_last_value [Integer, #to_int, #to_i]
|
1512
|
+
# @return [void]
|
1513
|
+
def set_xpub_manual_last_value(xpub_manual_last_value)
|
1514
|
+
raise DestroyedError unless @ptr
|
1515
|
+
self_p = @ptr
|
1516
|
+
xpub_manual_last_value = Integer(xpub_manual_last_value)
|
1517
|
+
result = ::CZMQ::FFI.zsock_set_xpub_manual_last_value(self_p, xpub_manual_last_value)
|
1518
|
+
result
|
1519
|
+
end
|
1520
|
+
|
1521
|
+
# Set socket option `xpub_manual_last_value`.
|
1522
|
+
# Available from libzmq 4.3.0.
|
1523
|
+
#
|
1524
|
+
# This is the polymorphic version of #set_xpub_manual_last_value.
|
1525
|
+
#
|
1526
|
+
# @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
|
1527
|
+
# object reference to use this method on
|
1528
|
+
# @param xpub_manual_last_value [Integer, #to_int, #to_i]
|
1529
|
+
# @return [void]
|
1530
|
+
def self.set_xpub_manual_last_value(self_p, xpub_manual_last_value)
|
1531
|
+
self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
|
1532
|
+
xpub_manual_last_value = Integer(xpub_manual_last_value)
|
1533
|
+
result = ::CZMQ::FFI.zsock_set_xpub_manual_last_value(self_p, xpub_manual_last_value)
|
1534
|
+
result
|
1535
|
+
end
|
1536
|
+
|
944
1537
|
# Get socket option `router_notify`.
|
945
1538
|
# Available from libzmq 4.3.0.
|
946
1539
|
#
|
@@ -326,7 +326,7 @@ module CZMQ
|
|
326
326
|
|
327
327
|
# Format a string using printf formatting, returning a freshly allocated
|
328
328
|
# buffer. If there was insufficient memory, returns NULL. Free the returned
|
329
|
-
# string using zstr_free(). The hinted version allows to optimize by using
|
329
|
+
# string using zstr_free(). The hinted version allows one to optimize by using
|
330
330
|
# a larger starting buffer size (known to/assumed by the developer) and so
|
331
331
|
# avoid reallocations.
|
332
332
|
#
|
@@ -541,6 +541,27 @@ module CZMQ
|
|
541
541
|
result
|
542
542
|
end
|
543
543
|
|
544
|
+
# Configure the numeric prefix to each thread created for the internal
|
545
|
+
# context's thread pool. This option is only supported on Linux.
|
546
|
+
# If the environment variable ZSYS_THREAD_NAME_PREFIX_STR is defined, that
|
547
|
+
# provides the default.
|
548
|
+
# Note that this method is valid only before any socket is created.
|
549
|
+
#
|
550
|
+
# @param prefix [String, #to_s, nil]
|
551
|
+
# @return [void]
|
552
|
+
def self.set_thread_name_prefix_str(prefix)
|
553
|
+
result = ::CZMQ::FFI.zsys_set_thread_name_prefix_str(prefix)
|
554
|
+
result
|
555
|
+
end
|
556
|
+
|
557
|
+
# Return thread name prefix.
|
558
|
+
#
|
559
|
+
# @return [String]
|
560
|
+
def self.thread_name_prefix_str()
|
561
|
+
result = ::CZMQ::FFI.zsys_thread_name_prefix_str()
|
562
|
+
result
|
563
|
+
end
|
564
|
+
|
544
565
|
# Adds a specific CPU to the affinity list of the ZMQ context thread pool.
|
545
566
|
# This option is only supported on Linux.
|
546
567
|
# Note that this method is valid only before any socket is created.
|
@@ -735,6 +756,16 @@ module CZMQ
|
|
735
756
|
result
|
736
757
|
end
|
737
758
|
|
759
|
+
# Test if ipv6 is available on the system. Return true if available.
|
760
|
+
# The only way to reliably check is to actually open a socket and
|
761
|
+
# try to bind it. (ported from libzmq)
|
762
|
+
#
|
763
|
+
# @return [Boolean]
|
764
|
+
def self.ipv6_available()
|
765
|
+
result = ::CZMQ::FFI.zsys_ipv6_available()
|
766
|
+
result
|
767
|
+
end
|
768
|
+
|
738
769
|
# Set network interface name to use for broadcasts, particularly zbeacon.
|
739
770
|
# This lets the interface be configured for test environments where required.
|
740
771
|
# For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is
|
@@ -798,6 +829,46 @@ module CZMQ
|
|
798
829
|
result
|
799
830
|
end
|
800
831
|
|
832
|
+
# Set IPv4 multicast address to use for sending zbeacon messages. By default
|
833
|
+
# IPv4 multicast is NOT used. If the environment variable
|
834
|
+
# ZSYS_IPV4_MCAST_ADDRESS is set, use that as the default IPv4 multicast
|
835
|
+
# address. Calling this function or setting ZSYS_IPV4_MCAST_ADDRESS
|
836
|
+
# will enable IPv4 zbeacon messages.
|
837
|
+
#
|
838
|
+
# @param value [String, #to_s, nil]
|
839
|
+
# @return [void]
|
840
|
+
def self.set_ipv4_mcast_address(value)
|
841
|
+
result = ::CZMQ::FFI.zsys_set_ipv4_mcast_address(value)
|
842
|
+
result
|
843
|
+
end
|
844
|
+
|
845
|
+
# Return IPv4 multicast address to use for sending zbeacon, or NULL if none was
|
846
|
+
# set.
|
847
|
+
#
|
848
|
+
# @return [String]
|
849
|
+
def self.ipv4_mcast_address()
|
850
|
+
result = ::CZMQ::FFI.zsys_ipv4_mcast_address()
|
851
|
+
result
|
852
|
+
end
|
853
|
+
|
854
|
+
# Set multicast TTL default is 1
|
855
|
+
#
|
856
|
+
# @param value [Integer, #to_int, #to_i]
|
857
|
+
# @return [void]
|
858
|
+
def self.set_mcast_ttl(value)
|
859
|
+
value = Integer(value)
|
860
|
+
result = ::CZMQ::FFI.zsys_set_mcast_ttl(value)
|
861
|
+
result
|
862
|
+
end
|
863
|
+
|
864
|
+
# Get multicast TTL
|
865
|
+
#
|
866
|
+
# @return [Integer]
|
867
|
+
def self.mcast_ttl()
|
868
|
+
result = ::CZMQ::FFI.zsys_mcast_ttl()
|
869
|
+
result
|
870
|
+
end
|
871
|
+
|
801
872
|
# Configure the automatic use of pre-allocated FDs when creating new sockets.
|
802
873
|
# If 0 (default), nothing will happen. Else, when a new socket is bound, the
|
803
874
|
# system API will be used to check if an existing pre-allocated FD with a
|