KapilGarg
KapilGarg

Reputation: 9

How do I create a multicast stream socket over IPv6 in Python?

I need some help in implementing Multicast Streaming server over IPv6 preferably in Python. I am able to do so with Datagram servers but since I need to send large amounts of data (images and videos) over the connection, I get an error stating , data too large to send.

Can any one tell me how do I implement a Streaming Socket with multicast that can both send and receive data?

Also, if there is a better way to do than Stream Sockets, please tell.

Thank You.

Upvotes: 0

Views: 669

Answers (1)

Anders Waldenborg
Anders Waldenborg

Reputation: 3035

You DO want to use datagrams, as with multicast there are multiple receivers and a stream socket will not work.

You need to send your data in small chunks (datagrams) and state in each which part of the stream it is so receivers can detect lost (and reordered) datagrams.

Instead of inventing a new mechanism for identifying the parts you are most likely better off encapsulating your data in RTP.

If you are going to stream video it might be worth looking into gstreamer which can do both sending and receiving RTP and has python bindings.

Upvotes: 3

Related Questions