I want to stream a binary data using python. I do not  have any idea how to achieve it. I did created python socket program using SOCK_DGRAM. Problem with SOCK_STREAM is that it does not work over internet as our isp dont allow tcp server socket. 
I want to transmit screen shots periodically to remote computer.
I have an idea of maintaining a Que of binary data and have two threads write and read synchronously. 
I do not want to use VNC .
How do I do it?
I did written server socket and client socket using SOCK_STREAM  it was working on localhost and did not work over internet even if respective ip's are placed. We also did tried running tomcat web server on one pc and tried accessing via other pc on internet and was not working.
SOCK_STREAM is the correct way to stream data.
What you're saying about ISPs makes very little sense; they don't control whether or not your machine listens on a certain port on an interface. Perhaps you're talking about firewall/addressing issues?
If you insist on using UDP (and you shouldn't because you'll have to worry about packets arriving out of place or not arriving at all) then you'll need to first use socket.bind and then socket.recvfrom in a loop to read data and keep track of open connections. It'll be hard work to do correctly.
How to stream binary data in python