#NEWLINE# def recv( self , flags = 0 ) : #NEWLINE# #INDENT# buf = ffi . new ( 'char**' ) #NEWLINE# rc = nanomsg . nn_recv ( self . sock , buf , NN_MSG , flags ) #NEWLINE# assert ( rc > 0 ) , rc #NEWLINE# s = ffi . buffer ( buf [ 0 ] , rc ) [ : ] #NEWLINE# nanomsg . nn_freemsg ( buf [ 0 ] ) #NEWLINE# return s