title: how to differentiate tcp/udp when programming sockets
body: <p>Following is a python socket snippet:</p>
  
  <pre><code>import socket
  socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  </code></pre>
  
  <p>My question is: does the line state whethet socket connection will be transported via TCP/IP? So far I was programming TCP connections only, using above line, but probably I was unaware of the fact. Am I able to program UDP connections using python sockets? How can I differentiate the transport layer?</p>
  
  <p>The question isn't strictly connected to python, explanations are welcome as well in c++ or anything else.</p>