def METHOD_NAME():
  print "Creating connection to Android...",
  sock = socket.create_connection(("localhost", PORT))
  print "Connected!"
  sizes = sock.recv(4)
  while len(sizes) < 4:
    sizes += sock.recv(4 - len(sizes))
  packet_size = (ord(sizes[0]) << 8) | ord(sizes[1])
  packets_per_test = (ord(sizes[2]) << 8) | ord(sizes[3])
  sock.send(ACK_BYTE)
  while True:
    byte = sock.recv(1)
    if not byte:
      print "Disconnected!"
      break
    print "recieved: " + byte
    if byte == 'U':
      test_upload_throughput(sock, packet_size, packets_per_test)
    elif byte == 'D':
      test_download_throughput(sock, packet_size, packets_per_test)
    elif byte == 'B':
      test_both_throughput(sock, packet_size, packets_per_test)
    elif byte == 'L':
      test_latency_avg(sock, packet_size, packets_per_test)