@@ -1388,6 +1388,8 @@ def test(verbose):
1388
1388
lib .zmsg_recv .argtypes = [c_void_p ]
1389
1389
lib .zmsg_send .restype = c_int
1390
1390
lib .zmsg_send .argtypes = [POINTER (zmsg_p ), c_void_p ]
1391
+ lib .zmsg_sendm .restype = c_int
1392
+ lib .zmsg_sendm .argtypes = [POINTER (zmsg_p ), c_void_p ]
1391
1393
lib .zmsg_size .restype = c_size_t
1392
1394
lib .zmsg_size .argtypes = [zmsg_p ]
1393
1395
lib .zmsg_content_size .restype = c_size_t
@@ -1492,6 +1494,16 @@ def send(self_p, dest):
1492
1494
it is a destructor)."""
1493
1495
return lib .zmsg_send (byref (zmsg_p .from_param (self_p )), dest )
1494
1496
1497
+ @staticmethod
1498
+ def sendm (self_p , dest ):
1499
+ """Send message to destination socket as part of a multipart sequence, and
1500
+ destroy the message after sending it successfully. Note that after a
1501
+ zmsg_sendm, you must call zmsg_send or another method that sends a final
1502
+ message part. If the message has no frames, sends nothing but destroys
1503
+ the message anyhow. Nullifies the caller's reference to the message (as
1504
+ it is a destructor)."""
1505
+ return lib .zmsg_sendm (byref (zmsg_p .from_param (self_p )), dest )
1506
+
1495
1507
def size (self ):
1496
1508
"""Return size of message, i.e. number of frames (0 or more)."""
1497
1509
return lib .zmsg_size (self ._as_parameter_ )
0 commit comments