Part of twisted.internet.interfaces.IReactorSocket View Source
Add an existing listening I{SOCK_DGRAM} socket to the reactor to monitor for read and write readiness. @param fileDescriptor: A file descriptor associated with a socket which is already bound to an address and marked as listening. The socket must be set non-blocking. Any additional flags (for example, close-on-exec) must also be set by application code. Application code is responsible for closing the file descriptor, which may be done as soon as C{adoptDatagramPort} returns. @type fileDescriptor: C{int} @param addressFamily: The address family (or I{domain}) of the socket. For example, L{socket.AF_INET6}. @type addressFamily: C{int} @param protocol: A L{DatagramProtocol} instance to connect to a UDP transport. @type protocol: L{DatagramProtocol} @param maxPacketSize: The maximum packet size to accept. @type maxPacketSize: C{int} @return: An object providing L{IListeningPort}. @raise L{UnsupportedAddressFamily}: If the given address family is not supported by this reactor, or not supported with the given socket type. @raise UnsupportedSocketType: If the given socket type is not supported by this reactor, or not supported with the given socket type.