czmq-ffi-gen 0.16.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,475 @@ module CZMQ
941
957
  result
942
958
  end
943
959
 
960
+ # Set socket option `only_first_subscribe`.
961
+ # Available from libzmq 4.3.0.
962
+ #
963
+ # @param only_first_subscribe [Integer, #to_int, #to_i]
964
+ # @return [void]
965
+ def set_only_first_subscribe(only_first_subscribe)
966
+ raise DestroyedError unless @ptr
967
+ self_p = @ptr
968
+ only_first_subscribe = Integer(only_first_subscribe)
969
+ result = ::CZMQ::FFI.zsock_set_only_first_subscribe(self_p, only_first_subscribe)
970
+ result
971
+ end
972
+
973
+ # Set socket option `only_first_subscribe`.
974
+ # Available from libzmq 4.3.0.
975
+ #
976
+ # This is the polymorphic version of #set_only_first_subscribe.
977
+ #
978
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
979
+ # object reference to use this method on
980
+ # @param only_first_subscribe [Integer, #to_int, #to_i]
981
+ # @return [void]
982
+ def self.set_only_first_subscribe(self_p, only_first_subscribe)
983
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
984
+ only_first_subscribe = Integer(only_first_subscribe)
985
+ result = ::CZMQ::FFI.zsock_set_only_first_subscribe(self_p, only_first_subscribe)
986
+ result
987
+ end
988
+
989
+ # Set socket option `hello_msg`.
990
+ # Available from libzmq 4.3.0.
991
+ #
992
+ # @param hello_msg [Zframe, #__ptr]
993
+ # @return [void]
994
+ def set_hello_msg(hello_msg)
995
+ raise DestroyedError unless @ptr
996
+ self_p = @ptr
997
+ hello_msg = hello_msg.__ptr if hello_msg
998
+ result = ::CZMQ::FFI.zsock_set_hello_msg(self_p, hello_msg)
999
+ result
1000
+ end
1001
+
1002
+ # Set socket option `hello_msg`.
1003
+ # Available from libzmq 4.3.0.
1004
+ #
1005
+ # This is the polymorphic version of #set_hello_msg.
1006
+ #
1007
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1008
+ # object reference to use this method on
1009
+ # @param hello_msg [Zframe, #__ptr]
1010
+ # @return [void]
1011
+ def self.set_hello_msg(self_p, hello_msg)
1012
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1013
+ hello_msg = hello_msg.__ptr if hello_msg
1014
+ result = ::CZMQ::FFI.zsock_set_hello_msg(self_p, hello_msg)
1015
+ result
1016
+ end
1017
+
1018
+ # Set socket option `disconnect_msg`.
1019
+ # Available from libzmq 4.3.0.
1020
+ #
1021
+ # @param disconnect_msg [Zframe, #__ptr]
1022
+ # @return [void]
1023
+ def set_disconnect_msg(disconnect_msg)
1024
+ raise DestroyedError unless @ptr
1025
+ self_p = @ptr
1026
+ disconnect_msg = disconnect_msg.__ptr if disconnect_msg
1027
+ result = ::CZMQ::FFI.zsock_set_disconnect_msg(self_p, disconnect_msg)
1028
+ result
1029
+ end
1030
+
1031
+ # Set socket option `disconnect_msg`.
1032
+ # Available from libzmq 4.3.0.
1033
+ #
1034
+ # This is the polymorphic version of #set_disconnect_msg.
1035
+ #
1036
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1037
+ # object reference to use this method on
1038
+ # @param disconnect_msg [Zframe, #__ptr]
1039
+ # @return [void]
1040
+ def self.set_disconnect_msg(self_p, disconnect_msg)
1041
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1042
+ disconnect_msg = disconnect_msg.__ptr if disconnect_msg
1043
+ result = ::CZMQ::FFI.zsock_set_disconnect_msg(self_p, disconnect_msg)
1044
+ result
1045
+ end
1046
+
1047
+ # Set socket option `wss_trust_system`.
1048
+ # Available from libzmq 4.3.0.
1049
+ #
1050
+ # @param wss_trust_system [Integer, #to_int, #to_i]
1051
+ # @return [void]
1052
+ def set_wss_trust_system(wss_trust_system)
1053
+ raise DestroyedError unless @ptr
1054
+ self_p = @ptr
1055
+ wss_trust_system = Integer(wss_trust_system)
1056
+ result = ::CZMQ::FFI.zsock_set_wss_trust_system(self_p, wss_trust_system)
1057
+ result
1058
+ end
1059
+
1060
+ # Set socket option `wss_trust_system`.
1061
+ # Available from libzmq 4.3.0.
1062
+ #
1063
+ # This is the polymorphic version of #set_wss_trust_system.
1064
+ #
1065
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1066
+ # object reference to use this method on
1067
+ # @param wss_trust_system [Integer, #to_int, #to_i]
1068
+ # @return [void]
1069
+ def self.set_wss_trust_system(self_p, wss_trust_system)
1070
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1071
+ wss_trust_system = Integer(wss_trust_system)
1072
+ result = ::CZMQ::FFI.zsock_set_wss_trust_system(self_p, wss_trust_system)
1073
+ result
1074
+ end
1075
+
1076
+ # Set socket option `wss_hostname`.
1077
+ # Available from libzmq 4.3.0.
1078
+ #
1079
+ # @param wss_hostname [String, #to_s, nil]
1080
+ # @return [void]
1081
+ def set_wss_hostname(wss_hostname)
1082
+ raise DestroyedError unless @ptr
1083
+ self_p = @ptr
1084
+ result = ::CZMQ::FFI.zsock_set_wss_hostname(self_p, wss_hostname)
1085
+ result
1086
+ end
1087
+
1088
+ # Set socket option `wss_hostname`.
1089
+ # Available from libzmq 4.3.0.
1090
+ #
1091
+ # This is the polymorphic version of #set_wss_hostname.
1092
+ #
1093
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1094
+ # object reference to use this method on
1095
+ # @param wss_hostname [String, #to_s, nil]
1096
+ # @return [void]
1097
+ def self.set_wss_hostname(self_p, wss_hostname)
1098
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1099
+ result = ::CZMQ::FFI.zsock_set_wss_hostname(self_p, wss_hostname)
1100
+ result
1101
+ end
1102
+
1103
+ # Set socket option `wss_trust_pem`.
1104
+ # Available from libzmq 4.3.0.
1105
+ #
1106
+ # @param wss_trust_pem [String, #to_s, nil]
1107
+ # @return [void]
1108
+ def set_wss_trust_pem(wss_trust_pem)
1109
+ raise DestroyedError unless @ptr
1110
+ self_p = @ptr
1111
+ result = ::CZMQ::FFI.zsock_set_wss_trust_pem(self_p, wss_trust_pem)
1112
+ result
1113
+ end
1114
+
1115
+ # Set socket option `wss_trust_pem`.
1116
+ # Available from libzmq 4.3.0.
1117
+ #
1118
+ # This is the polymorphic version of #set_wss_trust_pem.
1119
+ #
1120
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1121
+ # object reference to use this method on
1122
+ # @param wss_trust_pem [String, #to_s, nil]
1123
+ # @return [void]
1124
+ def self.set_wss_trust_pem(self_p, wss_trust_pem)
1125
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1126
+ result = ::CZMQ::FFI.zsock_set_wss_trust_pem(self_p, wss_trust_pem)
1127
+ result
1128
+ end
1129
+
1130
+ # Set socket option `wss_cert_pem`.
1131
+ # Available from libzmq 4.3.0.
1132
+ #
1133
+ # @param wss_cert_pem [String, #to_s, nil]
1134
+ # @return [void]
1135
+ def set_wss_cert_pem(wss_cert_pem)
1136
+ raise DestroyedError unless @ptr
1137
+ self_p = @ptr
1138
+ result = ::CZMQ::FFI.zsock_set_wss_cert_pem(self_p, wss_cert_pem)
1139
+ result
1140
+ end
1141
+
1142
+ # Set socket option `wss_cert_pem`.
1143
+ # Available from libzmq 4.3.0.
1144
+ #
1145
+ # This is the polymorphic version of #set_wss_cert_pem.
1146
+ #
1147
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1148
+ # object reference to use this method on
1149
+ # @param wss_cert_pem [String, #to_s, nil]
1150
+ # @return [void]
1151
+ def self.set_wss_cert_pem(self_p, wss_cert_pem)
1152
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1153
+ result = ::CZMQ::FFI.zsock_set_wss_cert_pem(self_p, wss_cert_pem)
1154
+ result
1155
+ end
1156
+
1157
+ # Set socket option `wss_key_pem`.
1158
+ # Available from libzmq 4.3.0.
1159
+ #
1160
+ # @param wss_key_pem [String, #to_s, nil]
1161
+ # @return [void]
1162
+ def set_wss_key_pem(wss_key_pem)
1163
+ raise DestroyedError unless @ptr
1164
+ self_p = @ptr
1165
+ result = ::CZMQ::FFI.zsock_set_wss_key_pem(self_p, wss_key_pem)
1166
+ result
1167
+ end
1168
+
1169
+ # Set socket option `wss_key_pem`.
1170
+ # Available from libzmq 4.3.0.
1171
+ #
1172
+ # This is the polymorphic version of #set_wss_key_pem.
1173
+ #
1174
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1175
+ # object reference to use this method on
1176
+ # @param wss_key_pem [String, #to_s, nil]
1177
+ # @return [void]
1178
+ def self.set_wss_key_pem(self_p, wss_key_pem)
1179
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1180
+ result = ::CZMQ::FFI.zsock_set_wss_key_pem(self_p, wss_key_pem)
1181
+ result
1182
+ end
1183
+
1184
+ # Get socket option `out_batch_size`.
1185
+ # Available from libzmq 4.3.0.
1186
+ #
1187
+ # @return [Integer]
1188
+ def out_batch_size()
1189
+ raise DestroyedError unless @ptr
1190
+ self_p = @ptr
1191
+ result = ::CZMQ::FFI.zsock_out_batch_size(self_p)
1192
+ result
1193
+ end
1194
+
1195
+ # Get socket option `out_batch_size`.
1196
+ # Available from libzmq 4.3.0.
1197
+ #
1198
+ # This is the polymorphic version of #out_batch_size.
1199
+ #
1200
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1201
+ # object reference to use this method on
1202
+ # @return [Integer]
1203
+ def self.out_batch_size(self_p)
1204
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1205
+ result = ::CZMQ::FFI.zsock_out_batch_size(self_p)
1206
+ result
1207
+ end
1208
+
1209
+ # Set socket option `out_batch_size`.
1210
+ # Available from libzmq 4.3.0.
1211
+ #
1212
+ # @param out_batch_size [Integer, #to_int, #to_i]
1213
+ # @return [void]
1214
+ def set_out_batch_size(out_batch_size)
1215
+ raise DestroyedError unless @ptr
1216
+ self_p = @ptr
1217
+ out_batch_size = Integer(out_batch_size)
1218
+ result = ::CZMQ::FFI.zsock_set_out_batch_size(self_p, out_batch_size)
1219
+ result
1220
+ end
1221
+
1222
+ # Set socket option `out_batch_size`.
1223
+ # Available from libzmq 4.3.0.
1224
+ #
1225
+ # This is the polymorphic version of #set_out_batch_size.
1226
+ #
1227
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1228
+ # object reference to use this method on
1229
+ # @param out_batch_size [Integer, #to_int, #to_i]
1230
+ # @return [void]
1231
+ def self.set_out_batch_size(self_p, out_batch_size)
1232
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1233
+ out_batch_size = Integer(out_batch_size)
1234
+ result = ::CZMQ::FFI.zsock_set_out_batch_size(self_p, out_batch_size)
1235
+ result
1236
+ end
1237
+
1238
+ # Get socket option `in_batch_size`.
1239
+ # Available from libzmq 4.3.0.
1240
+ #
1241
+ # @return [Integer]
1242
+ def in_batch_size()
1243
+ raise DestroyedError unless @ptr
1244
+ self_p = @ptr
1245
+ result = ::CZMQ::FFI.zsock_in_batch_size(self_p)
1246
+ result
1247
+ end
1248
+
1249
+ # Get socket option `in_batch_size`.
1250
+ # Available from libzmq 4.3.0.
1251
+ #
1252
+ # This is the polymorphic version of #in_batch_size.
1253
+ #
1254
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1255
+ # object reference to use this method on
1256
+ # @return [Integer]
1257
+ def self.in_batch_size(self_p)
1258
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1259
+ result = ::CZMQ::FFI.zsock_in_batch_size(self_p)
1260
+ result
1261
+ end
1262
+
1263
+ # Set socket option `in_batch_size`.
1264
+ # Available from libzmq 4.3.0.
1265
+ #
1266
+ # @param in_batch_size [Integer, #to_int, #to_i]
1267
+ # @return [void]
1268
+ def set_in_batch_size(in_batch_size)
1269
+ raise DestroyedError unless @ptr
1270
+ self_p = @ptr
1271
+ in_batch_size = Integer(in_batch_size)
1272
+ result = ::CZMQ::FFI.zsock_set_in_batch_size(self_p, in_batch_size)
1273
+ result
1274
+ end
1275
+
1276
+ # Set socket option `in_batch_size`.
1277
+ # Available from libzmq 4.3.0.
1278
+ #
1279
+ # This is the polymorphic version of #set_in_batch_size.
1280
+ #
1281
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1282
+ # object reference to use this method on
1283
+ # @param in_batch_size [Integer, #to_int, #to_i]
1284
+ # @return [void]
1285
+ def self.set_in_batch_size(self_p, in_batch_size)
1286
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1287
+ in_batch_size = Integer(in_batch_size)
1288
+ result = ::CZMQ::FFI.zsock_set_in_batch_size(self_p, in_batch_size)
1289
+ result
1290
+ end
1291
+
1292
+ # Get socket option `socks_password`.
1293
+ # Available from libzmq 4.3.0.
1294
+ #
1295
+ # @return [::FFI::AutoPointer]
1296
+ def socks_password()
1297
+ raise DestroyedError unless @ptr
1298
+ self_p = @ptr
1299
+ result = ::CZMQ::FFI.zsock_socks_password(self_p)
1300
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1301
+ result
1302
+ end
1303
+
1304
+ # Get socket option `socks_password`.
1305
+ # Available from libzmq 4.3.0.
1306
+ #
1307
+ # This is the polymorphic version of #socks_password.
1308
+ #
1309
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1310
+ # object reference to use this method on
1311
+ # @return [::FFI::AutoPointer]
1312
+ def self.socks_password(self_p)
1313
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1314
+ result = ::CZMQ::FFI.zsock_socks_password(self_p)
1315
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1316
+ result
1317
+ end
1318
+
1319
+ # Set socket option `socks_password`.
1320
+ # Available from libzmq 4.3.0.
1321
+ #
1322
+ # @param socks_password [String, #to_s, nil]
1323
+ # @return [void]
1324
+ def set_socks_password(socks_password)
1325
+ raise DestroyedError unless @ptr
1326
+ self_p = @ptr
1327
+ result = ::CZMQ::FFI.zsock_set_socks_password(self_p, socks_password)
1328
+ result
1329
+ end
1330
+
1331
+ # Set socket option `socks_password`.
1332
+ # Available from libzmq 4.3.0.
1333
+ #
1334
+ # This is the polymorphic version of #set_socks_password.
1335
+ #
1336
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1337
+ # object reference to use this method on
1338
+ # @param socks_password [String, #to_s, nil]
1339
+ # @return [void]
1340
+ def self.set_socks_password(self_p, socks_password)
1341
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1342
+ result = ::CZMQ::FFI.zsock_set_socks_password(self_p, socks_password)
1343
+ result
1344
+ end
1345
+
1346
+ # Get socket option `socks_username`.
1347
+ # Available from libzmq 4.3.0.
1348
+ #
1349
+ # @return [::FFI::AutoPointer]
1350
+ def socks_username()
1351
+ raise DestroyedError unless @ptr
1352
+ self_p = @ptr
1353
+ result = ::CZMQ::FFI.zsock_socks_username(self_p)
1354
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1355
+ result
1356
+ end
1357
+
1358
+ # Get socket option `socks_username`.
1359
+ # Available from libzmq 4.3.0.
1360
+ #
1361
+ # This is the polymorphic version of #socks_username.
1362
+ #
1363
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1364
+ # object reference to use this method on
1365
+ # @return [::FFI::AutoPointer]
1366
+ def self.socks_username(self_p)
1367
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1368
+ result = ::CZMQ::FFI.zsock_socks_username(self_p)
1369
+ result = ::FFI::AutoPointer.new(result, LibC.method(:free))
1370
+ result
1371
+ end
1372
+
1373
+ # Set socket option `socks_username`.
1374
+ # Available from libzmq 4.3.0.
1375
+ #
1376
+ # @param socks_username [String, #to_s, nil]
1377
+ # @return [void]
1378
+ def set_socks_username(socks_username)
1379
+ raise DestroyedError unless @ptr
1380
+ self_p = @ptr
1381
+ result = ::CZMQ::FFI.zsock_set_socks_username(self_p, socks_username)
1382
+ result
1383
+ end
1384
+
1385
+ # Set socket option `socks_username`.
1386
+ # Available from libzmq 4.3.0.
1387
+ #
1388
+ # This is the polymorphic version of #set_socks_username.
1389
+ #
1390
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1391
+ # object reference to use this method on
1392
+ # @param socks_username [String, #to_s, nil]
1393
+ # @return [void]
1394
+ def self.set_socks_username(self_p, socks_username)
1395
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1396
+ result = ::CZMQ::FFI.zsock_set_socks_username(self_p, socks_username)
1397
+ result
1398
+ end
1399
+
1400
+ # Set socket option `xpub_manual_last_value`.
1401
+ # Available from libzmq 4.3.0.
1402
+ #
1403
+ # @param xpub_manual_last_value [Integer, #to_int, #to_i]
1404
+ # @return [void]
1405
+ def set_xpub_manual_last_value(xpub_manual_last_value)
1406
+ raise DestroyedError unless @ptr
1407
+ self_p = @ptr
1408
+ xpub_manual_last_value = Integer(xpub_manual_last_value)
1409
+ result = ::CZMQ::FFI.zsock_set_xpub_manual_last_value(self_p, xpub_manual_last_value)
1410
+ result
1411
+ end
1412
+
1413
+ # Set socket option `xpub_manual_last_value`.
1414
+ # Available from libzmq 4.3.0.
1415
+ #
1416
+ # This is the polymorphic version of #set_xpub_manual_last_value.
1417
+ #
1418
+ # @param self_p [CZMQ::Zsock, #__ptr, ::FFI::Pointer, nil]
1419
+ # object reference to use this method on
1420
+ # @param xpub_manual_last_value [Integer, #to_int, #to_i]
1421
+ # @return [void]
1422
+ def self.set_xpub_manual_last_value(self_p, xpub_manual_last_value)
1423
+ self_p = self_p.__ptr if self_p.respond_to?(:__ptr)
1424
+ xpub_manual_last_value = Integer(xpub_manual_last_value)
1425
+ result = ::CZMQ::FFI.zsock_set_xpub_manual_last_value(self_p, xpub_manual_last_value)
1426
+ result
1427
+ end
1428
+
944
1429
  # Get socket option `router_notify`.
945
1430
  # Available from libzmq 4.3.0.
946
1431
  #