title: Sending a list of bytes over UDP
body: <p>I'm trying simply send a list of bytes over UDP, with code based on the sample Python sockets module. The client/server transmission works fine with strings. It seemed that using a bytearray was the way to go, however, the length received seems to depend on the content. Sending 1,2,3,4,5,6 works fine, but if I change the 6 to 10 or 11, I only receive 5 bytes on the server. Python 2.7.3 on Ubuntu. What am I not understanding?</p>
  
  <p>Client:</p>
  
  <pre><code>data = bytearray([1,2,3,4,5,6])
  sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  sock.sendto(data, (HOST, PORT))
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>class MyUDPHandler(SocketServer.BaseRequestHandler):
      def handle(self):
          data = self.request[0].strip()
          socket = self.request[1]
          print len(data)
          idata = map(ord, data)
          print len(idata)
          print idata[0],idata[1],idata[2],idata[3]
  </code></pre>