def recvmsg(socket, maxSize=8192, cmsgSize=4096, flags=0):
 if _PY3:
  (data, ancillary, flags) = socket.recvmsg(maxSize, CMSG_SPACE(cmsgSize), flags)[0:3]
 else:
  (data, flags, ancillary) = recv1msg(socket.fileno(), flags, maxSize, cmsgSize)
 return RecievedMessage(data=data, ancillary=ancillary, flags=flags)

def recvmsg ( socket , maxSize = 8192 , cmsgSize = 4096 , flags = 0 ) : if _PY3 : ( data , ancillary , flags ) = socket . recvmsg ( maxSize , CMSG_SPACE ( cmsgSize ) , flags ) [ 0 : 3 ] else : ( data , flags , ancillary ) = recv1msg ( socket . fileno ( ) , flags , maxSize , cmsgSize ) return RecievedMessage ( data = data , ancillary = ancillary , flags = flags )
receive a message on a socket .