#NEWLINE# def connect( self , addr ) : #NEWLINE# #INDENT# addr = ( addr . encode ( ) if isinstance ( addr , ustr ) else addr ) #NEWLINE# buf = ffi . new ( 'char[]' , addr ) #NEWLINE# rc = nanomsg . nn_connect ( self . sock , buf ) #NEWLINE# assert ( rc > 0 ) , rc