interface documentation
class IReactorMulticast(Interface):
Known implementations: twisted.internet.iocpreactor.reactor.IOCPReactor
, twisted.internet.posixbase.PosixReactorBase
UDP socket methods that support multicast.
IMPORTANT: This is an experimental new interface. It may change without backwards compatibility. Suggestions are welcome.
Method | listen |
Connects a given DatagramProtocol to the given numeric UDP port. |
def listenMulticast(port:
int
, protocol: DatagramProtocol
, interface: str
= '', maxPacketSize: int
= 8192, listenMultiple: bool
= False) -> IMulticastTransport
:
ΒΆ
Connects a given DatagramProtocol
to the given numeric UDP port.
Parameters | |
port:int | The port number to bind to. |
protocol:DatagramProtocol | the datagram receiver that will receive multicast packets sent to the given interface and port. |
interface:str | The IP address literal of the network interface to bind to. By default, this will be "0.0.0.0", i.e. all IPv4 interfaces. Note that the format of this literal determines the address family of the resulting multicast transport: passing an IPv6 literal, such as "::", will result in an IPv6 multicast transport. |
maxint | The maximum packet size to accept. |
listenbool | If set to True, allows multiple sockets to bind to the same address and port number at the same time. |
Returns | |
IMulticastTransport | An IMulticastTransport that can send multicast traffic to interface. |
See Also | |
http://twistedmatrix.com/documents/current/core/howto/udp.html |