def test_roundtrip(self):
        """
        L{recvmsg} will retrieve a message sent via L{sendmsg}.
        """
        message = b"hello, world!"
        self.assertEqual(
            len(message),
            sendmsg(self.input, message))

        result = recvmsg(self.output)
        self.assertEqual(result.data, b"hello, world!")
        self.assertEqual(result.flags, 0)
        self.assertEqual(result.ancillary, [])

        L{recvmsg} will retrieve a message sent via L{sendmsg}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_sendmsg.py